PrivacyQuick

Cookies & tracking

Tracking pixels explained: how they work and when you need consent

A tracking pixel is a tiny image or script that makes the visitor's browser send a request to a third party, reporting a page view, a conversion or an email open. In the EU and UK, marketing pixels need opt-in consent before they fire, even when they set no cookies.

  • Plain English
  • Written for website owners
  • Free to read

A tracking pixel is a small piece of code that makes a visitor's browser send a request to a third party when something happens: a page loads, a purchase completes, or an email is opened. The request carries details about the visit, and the third party links it to a profile or campaign. In the EU and UK, advertising pixels need opt-in consent before they fire. In the US, the main obligations are notice and honoring opt-outs, though some sectors and states go further.

How a tracking pixel works

The original pixel is a 1×1 transparent image. The image itself is irrelevant. What matters is that the browser has to request it from the tracker's server, and that request delivers information:

<img src="https://tracker.example.com/p.gif?event=purchase&value=49.00&currency=USD"
     width="1" height="1" alt="">

When the browser fetches that URL, the tracker's server receives:

  • the query string, which you or the tag fill with event details,
  • the visitor's IP address and user agent, which every HTTP request carries,
  • the referring page, depending on your referrer policy, and
  • any cookies the browser holds for the tracker's domain, if third-party cookies are allowed.

Most pixels today are JavaScript tags rather than plain images. The script loads from the vendor, sets first-party cookies on your domain, collects event data, and then sends it with an image request, a fetch call or navigator.sendBeacon. Vendors still call these tags "pixels" even though there is rarely an image involved.

What common pixels collect

Each platform's tag works a little differently, but the pattern is the same: identify the browser, record events, and match them to the platform's users for targeting and conversion measurement.

PixelTypical identifiersWhat it's used for
Meta Pixel_fbp and _fbc first-party cookies; optional hashed email or phone through Advanced MatchingConversion tracking, custom audiences, ad optimization
LinkedIn Insight TagFirst-party cookies on your domain plus LinkedIn's own cookies for logged-in membersConversion tracking, retargeting, website demographics
TikTok Pixel_ttp first-party cookie and click IDsConversions and audiences
Google Ads conversion tag_gcl_au and click IDs such as gclidConversion measurement and remarketing
Pinterest TagFirst-party cookies such as _pin_unauthConversions and audiences

Cookie names change over time, so treat this table as a starting point and confirm against a current scan of your own site. The Meta Pixel and GDPR guide goes deeper on Meta's setup in particular.

Two features deserve attention because they send more than browsing data. Advanced or enhanced matching hashes form data such as email addresses and sends it to the platform so it can match the visit to a user. Automatic event detection can pick up button clicks and form interactions you never explicitly configured. Check both settings in each platform before you decide what your consent text needs to say.

Under Article 5(3) of the ePrivacy Directive, storing information on a user's device or reading it requires consent unless it's strictly necessary for a service the user requested. Most pixels set or read cookies, so they plainly fall in scope.

What about a bare image pixel that sets nothing? The European Data Protection Board's Guidelines 2/2023 on the technical scope of Art. 5(3) take the view that tracking pixels and tracked URLs can fall under the provision too, because they instruct the device to send information to a third party. National regulators and courts apply this unevenly, but the safe reading is clear: a pixel whose purpose is advertising or measurement for your benefit belongs behind consent.

A pixel is never strictly necessary for the page the visitor asked for. The page works without it. So the exemption doesn't apply, and in opt-in regions the pixel must not fire until the visitor accepts the relevant category, usually marketing. The cookie categories guide explains how to classify tags.

Pixels under US privacy laws

The US has no general opt-in rule for pixels, but several laws reach them:

  • State privacy laws. Under the CCPA as amended by the CPRA, giving a platform data for cross-context behavioral advertising is "sharing". Visitors can opt out, and you must treat a Global Privacy Control signal as an opt-out. Other state laws give similar rights for targeted advertising.
  • Health and sensitive data. Pixels on pages about health conditions, appointments or prescriptions have drawn FTC and HHS attention. The guide to tracking on sensitive-data websites covers this.
  • Wiretapping and video privacy claims. Plaintiffs have used state wiretap statutes and the federal Video Privacy Protection Act against pixels that send page and video data to third parties. See the overview of wiretapping lawsuits.

In practice, a US site should at least block marketing pixels for visitors who opt out or send GPC, and should disclose its pixels in its privacy policy.

Email tracking pixels

Email marketing tools add a unique, invisible image to each message. When the recipient's mail client loads images, the request tells the sender that this person opened this email, often with a time and approximate location. Links in the email are usually rewritten to record clicks in the same way.

The EDPB guidelines mentioned above treat tracking pixels in emails as within the scope of Art. 5(3), since the recipient's device is terminal equipment. If you send marketing email to people in the EU or UK and track opens per recipient, you should get consent for that tracking, typically at sign-up, and explain it in your privacy notice. Some senders simply turn per-recipient open tracking off.

Open data has also become less reliable. Apple's Mail Privacy Protection, introduced in 2021, preloads remote content through a proxy for users who enable it, which hides their IP address and can register an "open" that never happened. Many email platforms let you disable open tracking per campaign or account, so check whether the numbers are worth the compliance work.

Controlling pixels on your website

You have three main options for holding pixels back until consent.

1. Block the tag until consent

The strictest approach stops the vendor's script from loading at all. Nothing is sent to the platform, not even the IP address that comes with fetching the script. With PrivacyQuick, you change the script to type="text/plain" and add data-category="marketing". The script blocking docs include a full Meta Pixel example, and the guide to blocking before consent compares techniques.

2. Use the platform's own consent controls

Some platforms let you load the tag but hold back data until consent. Meta's Pixel supports a consent command:

<script>
  // ...standard Meta Pixel base code that defines fbq...
  fbq('consent', 'revoke');           // hold events until consent
  fbq('init', 'YOUR_PIXEL_ID');
  fbq('track', 'PageView');

  document.addEventListener('pq:consent', function (e) {
    var ok = e.detail.categories.indexOf('marketing') > -1;
    fbq('consent', ok ? 'grant' : 'revoke');
  });
</script>

This keeps the page simpler, but the browser still downloads Meta's script before any choice, which exposes the visitor's IP address and user agent to Meta. In opt-in regions, blocking the script is the cleaner option.

3. Configure the tag in a tag manager

In Google Tag Manager, non-Google tags such as Meta or LinkedIn need an additional consent check, usually ad_storage, so they fire only when marketing is granted. The Google Consent Mode docs describe the setup.

Meta's Conversions API, LinkedIn's Conversions API and Google's enhanced conversions let your server send events directly to the platform. They're often sold as a fix for ad blockers and browser restrictions. They don't change your legal position:

  • You're still sharing personal data with the platform, so you need a legal basis under the GDPR, and in practice that means the visitor's consent to marketing.
  • Click IDs and browser identifiers your server forwards were usually read from the visitor's device, which brings Art. 5(3) back into play.
  • In US states with opt-out rights, a server-side event is still a sale or share of data if the browser version would be.

Send server-side events only for visitors whose consent state allows it, and pass the consent state along where the API supports it.

How to find every pixel on your site

  1. Open your site in a private window and don't touch the banner.
  2. In DevTools, open the Network tab and filter for common tracking hosts: facebook.com/tr, px.ads.linkedin.com, analytics.tiktok.com, googleadservices.com, ct.pinterest.com.
  3. Repeat on your checkout confirmation, sign-up and thank-you pages, where conversion pixels usually live.
  4. Check your tag manager containers and any e-commerce apps or plugins that add tags for you.
  5. Click Reject all and confirm that nothing fires. Then click Accept all and confirm that pixels work.

A free PrivacyQuick scan also lists third-party hosts contacted by each page, which catches pixels added by plugins or apps you've forgotten about.

Setup guides for specific ad tags: LinkedIn Insight Tag, TikTok Pixel and Microsoft Ads UET consent mode.

More ad tags: Pinterest Tag, X Pixel, Snap Pixel and Reddit Pixel. Pixels in emails work differently: see email tracking pixels and consent.

Marketing platforms that track on your site: HubSpot, Klaviyo, Mailchimp and Intercom.

Next steps

  • Inventory every pixel, its vendor, its cookies and the pages it runs on.
  • Put each one in the marketing category unless you have a strong reason otherwise.
  • Block pixels until consent in opt-in regions, and stop them on opt-out or GPC in the US.
  • Review advanced matching and automatic event settings, and turn off what you don't need.
  • Decide whether you need per-recipient email open tracking, and get consent for it where required.
  • Apply the same consent state to any server-side conversion API.

Frequently asked questions

Is a tracking pixel the same as a cookie?

No. A cookie is data stored in the browser, while a pixel is a request that sends data to a third party. Most modern pixels also set or read cookies, which is why the two are often discussed together.

Are tracking pixels illegal?

No. They are lawful when you meet the rules where your visitors are, which in the EU and UK means getting opt-in consent first, and in many US states means honoring opt-outs of sale, sharing and targeted advertising.

Do I need consent for email open tracking in the US?

There is no general federal consent rule for open tracking; CAN-SPAM focuses on headers, content and unsubscribes. You should still disclose open tracking in your privacy policy and check state laws that apply to your audience.

Can I fire a conversion pixel without consent if it only counts sales?

Not under EU or UK rules. A conversion pixel sends data from the visitor's device to an advertising platform for your benefit, which is not strictly necessary for the purchase, so it needs consent.

Check your own website in 30 seconds

Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.

Run a free cookie scan Start free

This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.