New: Pandectes in Claude & ChatGPT - ask your AI assistant about your cookie banner, scans and consent rates

New: Pandectes in Claude & ChatGPT See how it works

What Is a Tracking Pixel? How Pixels Work and When They Need Consent

A tracking pixel is a tiny piece of a web page or email, originally a transparent image of one pixel by one pixel, that makes the visitor’s browser contact a third-party server. The request tells that server that the page was viewed or the email was opened, and carries details such as the page address, the time, the browser and the IP address. Advertising and analytics tools such as the Meta Pixel, the TikTok Pixel and the Pinterest Tag use pixels to measure conversions and build audiences.

This article explains tracking pixels in general terms. It is not legal advice: what your site needs depends on the tools it uses, so take legal advice for your own case.

How a tracking pixel works

The classic pixel is an image tag whose source is a file on another company’s server. To show the image, the browser has to request it, and that request is the tracking:

  1. The page or email loads and the browser requests the image from the tracking server.
  2. The request carries the visitor’s IP address, the browser and device, the address of the page, and the time. Extra information, such as an event name, an order value or a product ID, is added to the image’s address.
  3. If the browser already holds a cookie for the tracking server’s domain and allows third-party cookies, it sends that cookie too, which lets the server recognise the same browser across sites and visits.
  4. The server records the hit and returns an invisible image, so the visitor sees nothing.

Most of today’s advertising “pixels” are JavaScript rather than a single image. The Meta Pixel, for example, loads a script that sets its own cookie on your domain, sends events such as page views, add-to-cart and purchases, and keeps an image tag only as a fallback for browsers that block scripts. The name stuck, so “pixel” now means any snippet that reports what a visitor does to an advertising or analytics platform.

What pixels are used for

  • Conversion tracking: reporting purchases, sign-ups and other actions back to the ad platform, so it can tell which ads worked.
  • Retargeting and audiences: recognising visitors later, to show them ads or to find people like them.
  • Analytics: counting page views and following visitors through a site.
  • Email open tracking: an image in a newsletter that loads when the email is opened, which tells the sender who opened it and when.

Pixels and cookies

A cookie is data stored in the browser. A pixel is a request that sends data out of it. The two usually work together: the pixel reads and sets cookies so the platform can tie hits from the same browser together. But a pixel can track without any cookie, because the request itself carries the IP address, the browser details and the page. This is why removing cookies alone does not stop pixel tracking, and why cookie rules are written to cover “similar technologies”. Our article on what cookies are covers the cookie side.

In the EU, Article 5(3) of the ePrivacy Directive requires consent before information is stored on, or accessed from, a visitor’s device, unless it is strictly necessary for a service the visitor asked for. The European Data Protection Board’s Guidelines 2/2023 on the technical scope of Article 5(3) say this covers tracking pixels, in web pages and in emails, and not only cookies. Advertising pixels, and most analytics pixels, are not strictly necessary, so they need consent before they fire. The GDPR applies as well, because the IP address and the identifiers a pixel sends are personal data. In Germany the same rule is § 25 TDDDG; see our guide to cookie banners in Germany.

A site that embeds a third-party pixel shares responsibility for it. In Fashion ID (C-40/17, 2019), the Court of Justice of the EU held that a website embedding Facebook’s “Like” button was a joint controller with Facebook for collecting the visitors’ data and sending it to Facebook.

In the UK, the Privacy and Electronic Communications Regulations (PECR) take a similar approach, and the ICO says they cover tracking pixels. Advertising pixels need consent. Since the Data (Use and Access) Act 2025, a few narrow purposes no longer do, such as a site’s own statistics used only to improve the service, provided visitors are told and can object.

In the US, there is no general consent requirement for pixels, but they are not unregulated:

  • The CCPA treats sending visitor data to an ad platform for cross-context behavioural advertising as “sharing”, and other state laws call it targeted advertising. Visitors can opt out of it, including through Global Privacy Control.
  • The FTC has taken action against companies that sent health information to advertisers through pixels, such as GoodRx and BetterHelp in 2023.
  • Pixels have drawn class actions under wiretapping laws such as the California Invasion of Privacy Act and under the Video Privacy Protection Act.

Server-side tracking does not remove the question

Platforms now offer server-to-server versions of their pixels, such as Meta’s Conversions API, which send events from your server instead of the visitor’s browser. That makes tracking more reliable, but it does not make it consent-free: the data still describes your visitors and still goes to the platform for advertising, so the GDPR still needs a legal basis for it, which for advertising is usually consent. The events also usually carry identifiers read from the visitor’s browser, such as the Meta Pixel’s cookie, so the ePrivacy consent rule can apply too. Send server-side events only for visitors who have agreed.

Tracking pixels on Shopify

Shopify runs the pixels of installed apps, and the custom pixels you add under Customer events, in a sandbox. In regions where your store requires consent, usually the EEA and the UK, it loads them only when the visitor’s choice, read through the Customer Privacy API, covers the purposes each pixel declares. Elsewhere they run by default, and a custom pixel whose permission is set to “Not required” runs regardless of the choice. This works only if your consent banner passes its choice to Shopify. Pixels pasted into the theme, or added by older apps, run outside that system and need to be blocked separately until the visitor consents.

How Pandectes helps

Pandectes GDPR Compliance scans your store for cookies, local storage and pixels and sorts them by category. Its auto-blocker holds back tracking scripts, iframes and pixels until the visitor consents, with presets for the Facebook Pixel, TikTok, Pinterest, Snapchat, Google Ads and others, and custom rules for any domain. It passes each choice to Shopify’s Customer Privacy API, so Shopify’s app and custom pixels follow it, and the Pandectes consent event lets your own custom pixels read the choice by category. For California visitors, it can turn on Meta’s Limited Data Use for the Facebook Pixel. Whether a store complies still depends on how it is configured and which tools it uses.

Frequently asked questions

What is a tracking pixel in simple terms? A tiny, invisible image or snippet of code on a web page or in an email. When it loads, the browser contacts the company behind it, which learns that the page was viewed or the email was opened, along with the IP address, browser and time.

Is a tracking pixel the same as a cookie? No. A cookie is stored in the browser; a pixel is a request that sends information to a third party. Pixels often read and set cookies, but they can track without them.

Do tracking pixels need consent under the GDPR? Advertising pixels do, in the EU and the UK, and in the EU so do most analytics pixels. The ePrivacy rules require consent before a site accesses information on a visitor’s device unless an exception applies, and the EDPB says this includes tracking pixels. The UK now exempts some first-party analytics, provided visitors are told and can object. The GDPR applies to the personal data the pixels send.

Can visitors block tracking pixels? Partly. Ad blockers and some browsers block known trackers, and Apple Mail’s Mail Privacy Protection, when turned on, loads remote images through relays so the sender does not learn the reader’s IP address. A website still has to ask for consent before its pixels fire; it cannot rely on visitors blocking them.

More from the Knowledge Base

  • Cookie Policy: What It Is, What to Include and a Sample

    What a cookie policy is, which laws require one, what it must include, and a sample cookie policy for an online store that you can adapt, with example cookies.

  • What Are Third-Party Cookies?

    What third-party cookies are, how they differ from first-party cookies, which browsers block them, how to block them yourself, and when a website needs consent for them.

  • What are cookies?

    What are internet cookies? Meaning, types of cookies, what they are used for, what accepting cookies means and when a website needs your consent.

Make your Shopify Store's use of cookies and online tracking compliant today

Try for free