Pixel Retargeting

I've been asked to do this for a customer. I was provided a code snippet that looks like this (I edited out the actual Id for privacy):

<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=xyz-abc"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayerZypmedia'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayerZypmedia','xyzabc');</script>
<!-- End Google Tag Manager -->

According to this link http://www.vicimediainc.com/install-retargetingremarketing-pixel-wordpress/, I just edit the theme footer & insert this code.

Does this sound correct?

I never heard of "Pixel Retargeting" before; hope one of you have.

Thanks
Richard KortsBusiness Owner / Chief DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
I am using the Bee Theme.

The file footer.php is attached.

It is not clear to me where the code goes.

A pointer would be useful.

Thanks
footer.php
Lucas BishopClick TrackerCommented:
First, what the customer has provided is their Google Tag Manager snippet. This code acts as a container that allows someone to insert any variety of scripts into a page. With this installed, your client can for example, insert Google Analytics, Crazyegg, Adwords Conversion Code, etc, all into the page, from a central dashboard in GTM, without asking you to put any additional code on the page.

Google recommends installing this code immediately after the opening body tag.

In regards to pixel retargeting. Your customer is probably setting up Remarketing in Google Analytics, or Adwords.

I'd recommend that you gain access to the GTM account and also install Tag Assistant so that you can make sure the installation is done correctly.
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
To Lucas Bishop,

How can I install "immediately after the opening body tag" in WordPress?

Thanks
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Lucas BishopClick TrackerCommented:
Take a look in header.php. You should see the opening body tag in there. You'll insert the GTM code directly below it.

When it's all said and done, the install would look something like this:

<body <?php body_class(); ?>>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=xyz-abc"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayerZypmedia'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayerZypmedia','xyzabc');</script>
<!-- End Google Tag Manager -->

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
Lucas Bishop,

Thanks.

I kind of guessed at that & I did just what you said; exactly.

I saved it & brought up the site. It looked the same, but based on the code, that's what I would have thought.

Richard
Lucas BishopClick TrackerCommented:
Good deal.

Yeah, you shouldn't see any changes on the site.

if you have Tag Assistant you'll see what is rendering in the code.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.