What Is a Tracking Pixel - The Invisible Code Behind Ad Reporting (2026)

The Short Answer

A tracking pixel is a small piece of code on a web page or in an email that reports an event to a server when it loads. Traditionally it was a 1x1 transparent image, which is where the name comes from. Today most ad "pixels", like Meta's, are JavaScript snippets that do the same job with more detail.

It's how an ad platform learns that someone who clicked your ad later viewed a page or bought something.

How a Pixel Fires

JavaScript code on a dark screen
  1. The page or email loadsIncluding the pixel code you added.
  2. The pixel sends a requestTo the platform's server, with details such as the page, the event and an identifier.
  3. Cookies help recognise the visitorSo the event can be tied to a previous ad click.
  4. The platform records the eventAnd uses it for reporting, optimisation and audiences.

What the Code Looks Like

A simplified image pixel is just an image tag pointing at a tracking server:

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

A JavaScript pixel loads a script that can send richer data, such as order value and product IDs, and fire different events on different pages.

Common Types

Types of tracking pixel
TypeWhat it recordsTypical use
Conversion pixelPurchases, leads, signupsMeasuring and optimising ads
Retargeting pixelPage visitsBuilding audiences to show ads to again
Email open pixelWhen an email's images loadOpen rates
Ad platform pixelSeveral events in one scriptMeta Pixel, TikTok Pixel, Google tag

People often mix these up. A pixel sends information to a server when it loads. A cookie stores information in the browser. They work together: the pixel reads or sets a cookie so it can recognise the same visitor next time.

Why Pixels Miss Conversions Now

  • Ad blockers stop many pixel scripts loading at all.
  • Browser privacy features limit third-party cookies and shorten some cookie lifespans.
  • iOS settings restrict app tracking.
  • Consent banners may block marketing pixels until the visitor agrees.
  • Email apps may preload images, which makes open-pixel data unreliable.

So a pixel alone usually under-reports. See our guides to iOS tracking changes and fixing missing conversions.

Pixel Plus Server Events

Close-up of networking hardware and wires

The modern setup keeps the pixel but adds a server-side route, like Meta's Conversions API, so conversions still reach the platform when the browser blocks the pixel. Matching event IDs let the platform count each sale once.

Where ClickMagick Fits

ClickMagick tracks clicks and sales with first-party code on your own domain, then sends conversions to Meta, Google, TikTok and Microsoft from its side. That gives the ad platforms the sales their pixels missed. See ClickMagick vs the Facebook pixel.

Recover the conversions your pixel can't see.

Try ClickMagick Free

Frequently Asked Questions

What is a tracking pixel?

A tracking pixel is a small piece of code, traditionally a 1x1 invisible image, placed on a web page or in an email. When it loads, it sends a request to a server, which records an event such as a page view, an email open or a purchase.

What is the difference between a pixel and a cookie?

A pixel sends information to a server when it loads. A cookie is a small file stored in the browser that remembers information. Pixels often read or set cookies so they can recognise a returning visitor.

Why does my ad pixel miss conversions?

Ad blockers, browser privacy features, iOS settings and declined consent can stop a pixel loading or limit what it can store. That's why advertisers now pair pixels with server-side events.

Are tracking pixels legal?

They're widely used, but privacy laws such as GDPR and CCPA require you to tell visitors about data collection and, in many cases, get consent before marketing pixels load.

Do I still need the Facebook pixel?

Meta recommends running the pixel alongside the Conversions API, with matching event IDs so it can remove duplicates. The pixel still captures browser signals the server can't.