Cookies and pixels: what are they, how do they work, and why are they important to digital advertising?

The first thing to say about cookies is that they weren’t originally designed for marketing purposes. When they were invented by Lou Montulli in 1994 their purpose was, simply, to help a website remember things about a user, e.g. whether or not they were logged in or what was in their online basket. But over time, as online advertising flourished alongside the growth of the world wide web, cookies began to be used for tracking and ad targeting.

What exactly is a cookie?
A cookie is a small text file that is saved in your browser when you visit a website. Cookies used for advertising purposes generally contain a string of numbers/letters called a Cookie ID and this acts as a unique identifier for the browser on which the cookie is stored.

The difference between first and third party cookies
The website login / online basket use-cases above are examples of first party cookies, i.e. cookies that originate from the website domain a user is visiting. An Ocado cookie on ocado.com would be a first party cookie. It can only be used by Ocado whilst you’re on their website.

Third party cookies, on the other hand, are where it gets interesting for marketers. They originate from outside the web domain the user is visiting, and they’ve been used by advertisers as a way to target & track customers and measure the effectiveness of digital advertising. A Campaign Manager cookie (from Google) dropped whilst you’re on ocado.com would be a third party cookie. It can be used by any website that can ‘read’ the cookie – which brings us on to pixels…

What is a pixel?
A pixel is a small snippet of code that you insert on your website. Pixels are what allow a website to drop a cookie on your browser or, where an existing cookie is matched using Cookie ID, to read the data in that cookie and add new information to it. Essentially a pixel has three jobs:

  • To create and drop a cookie on your browser

  • To add data to an existing (matched) cookie

  • To pass cookie data back to a server


So how does the process work?
Cookies and pixels work in partnership as part of the wider AdTech ecosystem facilitating the targeting and measurement of digital ads.

Pixels are the conduit for passing third party cookie data between servers. By sharing information in this way, advertisers and tech companies (like Google) are able to:

  • Build and utilise interest-based audiences based on the sites a browser visits, e.g. if you browse lots of travel sites you might be put in an ‘In-market for holiday’ audience bucket.

  • Attribute the success of ad campaigns by tracking user action, e.g. clicks on specific ads that lead to a conversion (commercially usually a sale).

This is immensely valuable data to marketers who can leverage this information to target their ad spend more effectively. For example, if you see a website is converting sales particularly effectively you might decide to invest in a homepage takeover on that site. Or if a particular ad variant is getting lots of clicks, you might want to update your other creatives with the same look & feel.

The future of cookies
There has been an increasing push for greater web privacy, both legislatively and through moves by browsers to limit tracking by ending support for third party cookies.

Apple’s Intelligent Tracking Prevention (ITP) and Firefox’s Enhanced Tracking Protection (ETP) already block third party cookies by default. Chrome has been slower to follow suit (naturally, perhaps, given Google’s financial interest in digital advertising) but will begin phasing out third-party cookies in the second half of 2024.

There’s no agreement yet on an alternative to third-party cookies, although a number of proposals are on the table including Google’s Privacy Sandbox as well as proposals from Microsoft (Parakeet) and other ad tech companies. Apple also looks to be making a move into advertising platforms and it’ll be interesting to see what, if any, targeting, tracking & measurement they’ll put in place as part of that, balanced against their long-held commitment to user-privacy (PR Week has a good summary).

Although cookies are often much-maligned, advertising powered by cookies is also the technology that has kept the internet free for its entire history to date. And although people’s expectations around data privacy have shifted, the expectation of free content remains. Whatever ends up replacing cookies will have a huge impact and the shift towards a privacy-driven web is something both commercial and non-profit organisations will need to grapple with.

Next
Next

Building synergy between digital marketing and the development of user personas