What a tracking pixel is

A tracking pixel is a 1×1 element (a PNG or GIF) embedded in the HTML of a page or an email with a src attribute pointing at an analytics or advertising server. As the page loads, the browser requests that image and passes the event parameters through the URL.

<!-- A tracking pixel -->
<img src="https://tracker.example.com/pixel.gif?uid=123&event=view&page=pdp"
     width="1" height="1" style="display:none;" />

The server receives the GET request with its parameters and logs the event. The visitor sees nothing.

Pixels in advertising

Modern advertising pixels are in fact JavaScript libraries that set third-party cookies and send structured events:

  • PageView — a page visit
  • AddToCart — an item added to the basket
  • Purchase — a completed purchase with its value

The ad platform uses that data for two jobs: attributing conversions to campaigns and building lookalike audiences for targeting.

Pixel Primary job Data type
Meta Pixel Attribution + lookalike Behaviour + transactions
TikTok Pixel Retargeting + lookalike Behaviour + transactions
Google Tag Conversions + remarketing Transactions + events

Pixels in email: open tracking

In email campaigns the pixel answers a specific question: did the recipient open the message? The HTML email contains an <img> with a unique URL. When the recipient opens the message and the client loads images, the server records an open.

Limits: since iOS 15, Apple Mail loads images through its own proxy as the message arrives, regardless of what the recipient does. Open data from Apple devices has become unreliable: the same person can register three opens without ever reading the message.

Important: measure email engagement with clicks, which are a more reliable metric. The open rate is indicative, not exact.

Pixel or event API: how to choose

A pixel (client side) is simple to install but bounded by the browser: blockers, third-party cookie restrictions, no data at all when JavaScript is disabled.

An event API (server side) sends data straight from your server to the ad platform or analytics system, bypassing the browser. It is more reliable, unaffected by blockers and able to carry fuller transaction data.

Large retailers combine both: a client-side pixel for speed and a server-side API for reliability, with event deduplication between them.