How to install a Retargeting/Remarketing Pixel in WordPress. (Example)

Published on
May 30, 2014
Contributors
Megan Malone
megan@vicimediainc.com

Megan Malone is a Founding Partner with Vici, and leads our Operations division.  Megan has both a radio and digital marketing background working for the Philadelphia Eagles, Beasley Broadcast Group, and Cox Media Group. In her career she has helped plan and implement thousands of digital media campaigns.   She holds a certification from Disney Institute’s People Management, Google Analytics, and was awarded the top 10 advertisers in Louisville from the American Advertisers Federation.  In her free time Megan is relaxing in Phoenix, Arizona with her husband Dave and toddler Zoey.

Subscribe to our newsletter
Read about our privacy policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Retargeting web visitors is a common best practice to maximize conversions and invite back potential customers to your website. Our clients often ask us to help retarget (or remarket) their web traffic. Retargeting technology uses a pixel (lines of HTML code), which creates a cookie to track site visitors. But how the heck do you install that pixel?

Wordpress doesn't make it super clear on how to do this on the footer of every page in the dashboard. So this is how it works! To add the remarketing or retargeting pixel to your WordPress site, follow these simple steps

  1.  Go to your dashboard and select Appearance (on the left hand menu bar) and then Editor.
  2.  From there, you can view your Templates, followed by php files on the very right.
  3.  Select the “footer.php” from the php files, scroll down to the closing body tag, and place the retargeting pixel directly above it. (Note: if you don't  see "footer.php" then just hit Control or Command F on your keyboard, type in "footer.php" and hit Enter or Return. CTL+F=AWESOME)

See the examples below, using the my own custom theme, but please note your theme will probably be different. This process will work with any PHP code if just find the footer

Sample PHP before the retargeting tracking pixel has been installed (sample only — don’t use in your website’s code).

<?php wp_footer(); ?>

<!– <?php echo BAVOTASAN_THEME_NAME; ?> created by c.bavota – https://themes.bavotasan.com –>

</body>

</html>

Sample PHP after retargeting tracking pixel has been installed (sample only — don’t use in your website’s code).

<?php wp_footer(); ?>

<!– <?php echo BAVOTASAN_THEME_NAME; ?> created by c.bavota – https://themes.bavotasan.com –>

<script src=”http://ib.adnxs.com/seg?add=1065823&t=1″ type=”text/javascript”></script>

</body>

</html>

Have more questions? Leave a comment and we'll help you out! And don't freak out if we retarget you :



vici digital products





UPDATE: 6-3-15, What happens if you can't find the PHP Files? It's just not there? Here's your answer(s)!

Some WordPress developers build their themes with a "pixel integration area" a specific spot to place container tags and pixels

To find this area, in the WordPress menu- you can visit "Salient" and then "General Settings"

Then, you can just paste the pixel in the "Google Analytics" box. Then click "Save Change"

Don't have Salient? No worries! Just download your free WordPress Custom Header/Footer plugin, and paste the pixel into the footer of the plugin!

A Simple Guide to Adding the Google Remarketing Pixelhow do I install a retargeting or remarketing pixel on my wordpress sit how to install pixel retargeting or remarketing across every page of a wordpress site

Related Posts

Tips, guides, industry best practices, and news.
Category Link
YouTube+: The Branding and Awareness Machine
In today’s digital landscape, attention is everything and YouTube is where that attention lives. With billions of users, laser-sharp targeting, flexible budgets, and measurable performance, advertising on YouTube isn’t just a trend it’s a strategic advantage.
Dan Charon
June 25, 2025
Category Link
From Pitch to Performance: Selling Smarter with Digital Media
The best digital salespeople aren’t just selling—they’re guiding. With the right materials, mindset and momentum, your pitch becomes a performance your client won’t forget.
Tracey Geary
June 9, 2025
Category Link
Are You Missing Out on the Marketing Power of the Theatre of the Mind? Online Audio!
Online Audio is a great tool to enhance a digital campaign and falls within the branding and awareness part of the sales funnel. Audio reaches consumers while they're engaging in other things like commuting, working out, or cooking...
Katie Pray
June 3, 2025