Link to home
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

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="//"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

According to this link, 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.

Avatar of Richard Korts
Richard Korts
Flag of United States of America image


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.

Avatar of Lucas Bishop
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.
To Lucas Bishop,

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

Avatar of Lucas Bishop
Lucas Bishop
Flag of United States of America image

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Lucas Bishop,


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.

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.