How To Install a Tracking Pixel or Cookie on a WordPress Website
“How do you install a tracking pixel on a website?” has been the question of the month for me here at Harvester Solutions. When working with social media and other web services, it is so important to have the ability to track user activity on a website. This is crucial because you can make much better decisions about what to do with a website when you know how people are using and interacting with it. And, retargeting of ads to visitor to a website is a great way to increase engagement along with sales. A great way to learn more about a user’s interaction with a website is to implement a tracking mechanism like a pixel or cookie. After it is installed, user behavior can be monitored to see how folks are navigating through a website. That’s great for people wanting to make the best website experience possible for visitors and wanting to get more out of the website in general.
The cool part about WordPress is that you can get access to all three of these areas from the Dashboard. Go to “Appearance” –> “Editor” and you will find all the core files that need to be updated with the tracking pixel code snippet. However, much chaos will rain down if one of those files gets screwed up by making an unwarranted edit. If you are comfortable adding code snippets to the header.php, footer.php, or other template php file, then go for it. Word to the wise though, make a quick copy of the original file before editing it. You’ll thank me for it if you screw up the edit and get a white page of death.
So, adding the tracking pixel manually isn’t all that difficult if you are comfortable with a bit of coding. For those who don’t have that comfort level, NEVER FEAR, there is a plugin that can handle the task too. I am semi-comfortable with digging into code, but really like it when I can find a plugin that someone more talented in the coding arena has developed to take care of the problem.
Tracking Code Manager is a good option to implement a tracking pixel or cookie into a WordPress website. It’s a simple plugin that lets you add tracking pixels to just about any part of the website. This is handy because some of the code snippets need to go into the header, some into the footer, and sometimes they need to be placed in the web page body. It all depends on the entity supplying the tracking code.
Another great feature of Tracking Code Manager is the ability to limit the tracking pixel to specific pages or posts. This can be challenging if installing the tracking pixel manually via the WP Editor because it can be hard to limit the pixel installation to one particular spot on the website. The Tracking Code Manager makes this process so much easier. As an added bonus, there is no limit to the number of pixels that can be embedded. Most plugins that have pixel functionality will limit the number of pixels that can be implemented. This capability is really good to have when using tracking pixels from third parties, Facebook, Google Ads, etc. all on one website.
Adding a tracking pixel to a WordPress website isn’t too tough. It can be done in several ways, either manually and/or via a plugin. After installing tracking codes on many websites, I recommend using the plugin because it requires very little working knowledge of coding. An added bonus is that the plugin makes it much easier to explain to someone who might be taking over those duties. However, if you are a code-monger, then feel free to insert code into the appropriate WordPress php template and get things working.
As always, feel free to contact Harvester Solutions if you need a tracking pixel installed or have a questions about the digital world. We are happy to help.