Marketing Tags and Pixels – What They Are and How They Work

Marketing Tags and Pixels – What They Are and How They Work
Estimated Reading Time: 6 minutes

What on earth are “marketing tags” and “pixels”?

Our team here at Tag Inspector specializes in all things tags and pixels. We implement them, audit them, monitor them, and validate them. Unless you work in IT or advertising/marketing operations, tags and pixels are probably a foreign concept that you haven’t heard much of.

However, you’ve likely seen all kinds of headlines recently in the news:

But when you dig into the matter, what exactly is the basis for all of these massive fines? What exactly is being violated? And how do marketing tags and pixels fit into the picture?

So let us help!

blog-banner-inspector-with-logo

What exactly is a tag/pixel?

A “tag” (or often called a “pixel”) is a short snippet of JavaScript (code) that does something on your website. In the context of marketing/advertising tags and pixels, they are often collecting some information about the visitor to a website and their behavior on the site. This is then beamed back to the respective marketing/advertising platform to be processed and reported.

A quick common example: Facebook tags/pixels – a Facebook pixel is implemented across all pages of a website to collect information about users that came to the site via Facebook. A Facebook tag may be implemented on a “Thank You” page after purchasing a product. When you reach the “Thank You” page, the Facebook tag will execute (or “fire”) and send to Facebook specific information about the products that you purchased. For example: the revenue of the transaction, the advertisement/article you came to the shopping site from, etc.

In our example, the Facebook tag on that “Thank You” page is what makes analysis and reporting on the user behavior possible.

This is what a tag looks like in the source code of a page (Google Tag Manager in this example from the Tag Inspector site):

Screen Shot 2016-05-24 at 10.21.42 AM

As you can see, nothing too impressive from the looks of it.  But the real power is in how they work.

How do marketing and advertising tags and pixels work?

Now, this is a much more complicated question that depends greatly upon the individual tag we’re looking at. At a very high level, the process works as follows:

  1. A user pulls up a web page, thus initiating page load.
  2. The browser “reads” the source code of the page, embedded in the source code are the various JavaScript tags (like the script that you see above).
  3. When the browser “reads” the part of the page where the JavaScript tag/pixel is, it executes (or “fires”).
    • A little caveat here is if tags are managed through a Tag Management System (TMS) or if they are piggybacking off another tag. In those cases, the initial tag (or TMS) that is on the page is what is executed. That TMS tag that is fired then fires the other tags that are contained within it.
  4. When a tag is fired, its given function is executed.
    • For most tags, this means that tracking information is sent. The tag will capture information from the user (possible data such as user ID, the source that the user came from, the location of the user, etc), information from the page (if it’s an e-commerce site this would be information like the products being viewed, information about each product like SKU, price, color, or for a content site, would be information such as article title, author, etc.), and information from the URL (here is where the campaign information comes in; if using Adobe Analytics it may be the CID value or in Google Analytics it may be utm parameters).
  5. The data collected by the tag is then sent to a third party destination where it is recorded and processed, leading to the pretty analytics reports and web analytics!
    • For many tags, the request being sent will be structured as follows: www.thirdpartydomain.com/?a=userinfo1&b=pageinfo2&c=campaigninfo3. The first section (thirdpartydomain.com) shows us where the data is going and the section at the end is the data being collected in the query string. In a future section, we will discuss how to see all of this and troubleshoot tracking.

This same process then continues for all tags deployed on each page and each event (or on-screen action, ie. button click) that is set up. The result is the analytics reports that we all know and love.

So: basically, all user activity is being tracked by various third-parties across the entire internet?

Yes, exactly! This day and age, as has been going on for more than two decades now, users are the product. All of those eyeballs and impressionable minds! And thus, accordingly, an entire cottage industry of companies pedaling tracking tags have sprung up to hoover up all of that precious user data for sharing and resale. The entire foundation of the modern internet (and how so much can be given away for free) is built on advertising. And these JavaScript tags are what makes it all possible!

The litigation cases mentioned at this article’s beginning are happening now because after two decades of letting companies run wild, state actors are finally awakening to this sobering reality. Nowadays, the state is increasingly putting consumer protections into place to curtail the rampant data collection. The long arm of the law has woken up! And so organizations that do not adhere to consumer consent preferences will increasingly be fined and sued.

If all of this sounds fascinating and you’re interested in getting some help to corral the tags and pixels of your sprawling portfolio of sites, please do contact us at Tag Inspector!

Have questions about tags and pixels?

Our team of experts is here to help whenever you need us.
Originally Published On May 24, 2016
July 20, 2023