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
Amazon’s Data Engine Is Changing the Way Cars Are Sold
Amazon is now the largest online retailer of auto parts in the world where people do vehicle research and buy vehicles through Amazon Showroom.
Katie Pray
October 1, 2025
Category Link
TikTok: Why Brands Can’t Afford to Skip the Scroll
TikTok has over 1 billion monthly active users globally. TikTok emphasizes quick, engaging, and easily shareable content, making it ideal for viral trends.
Jennaya Sullivan
September 24, 2025
Category Link
Faith-Focused Schooling, Data-Driven Results
This multi-level strategy has not only built a reliable pipeline of engaged families but also delivered results well above industry benchmarks!
Vici Team
September 18, 2025