What is a tracking pixel?
A tracking pixel is a small piece of code, on a web page or in an email, whose only job is to make the visitor's device send a request to a tracking server. When that request arrives, the server knows that the page was viewed or the email was loaded, and it can log extra details that travel with the request.
The name is historical. The first tracking pixels were literal pixels: a transparent image, one pixel wide and one pixel high, that nobody could see. The image itself was never the point. The act of loading it was.
Most tracking pixels today are not images. The Meta Pixel and Google tag, for example, are small scripts that load more code from the ad platform and then send events such as PageView, AddToCart or Purchase. The industry kept the word "pixel" for all of them, and the EDPB's own guidance defines a tracking pixel the same way: a hyperlink to a resource, usually an image, embedded in a website or email, whose sole purpose is to make the client contact the pixel's host.
This guide explains how pixel tracking works, what a pixel can and cannot see, the main types, why browser pixels lose data in 2026, the privacy rules, and how to build and test a simple one.
How a tracking pixel works
Every tracking pixel follows the same four steps.
- The pixel is placed. It is added to a page, a thank-you screen or an email, either as an
imgtag or as a script. - The device loads it. When the page or email renders, the browser or email app requests the pixel's URL. For an image pixel, that is a normal image request. For a script pixel, the script runs and then fires its own requests.
- The server receives the request. The request carries data automatically (more on that below) plus anything the pixel owner added to the URL, such as a campaign name or an event name.
- The server records it and answers. It logs the hit. For an image pixel it replies with a tiny transparent image so nothing looks broken. For a script pixel, the reply is usually just an acknowledgement.
A plain image pixel looks like this in HTML:
<img src="https://track.example.com/p.gif?c=spring-sale" width="1" height="1" alt="" />
The visitor sees nothing. The server at track.example.com sees a request for p.gif with c=spring-sale attached.
Meta's base code even includes an image pixel as a fallback for browsers with scripts disabled: a noscript block that requests facebook.com/tr with your pixel ID and the event name. It is the same mechanism, wrapped in a modern tool.
What data does a tracking pixel collect?
A pixel gets some data for free, because the request has to contain it, and some data only because the pixel owner chose to add it.
| Data | Where it comes from | Notes |
|---|---|---|
| IP address | The network connection | Gives approximate location. Apple Mail and some privacy tools replace it with a proxy address |
| Browser and device | The User-Agent header | Browser, version and operating system |
| Page or email viewed | The Referer header or a value in the URL | Which page loaded the pixel, when the browser sends it |
| Time of the request | The server's clock | Used for open times, visit times and conversion times |
| Language | The Accept-Language header | Browser language setting |
| Cookies for the pixel's domain | The browser, if any exist and are allowed | This is what links one visit to the next |
| Custom values | Query parameters or the script's payload | Event name, order value, campaign, click ID, hashed email |
The last row is the powerful one, and the one regulators watch. A bare pixel can only say "someone loaded this". A pixel that also carries a click ID, a customer identifier and an order value can say "this ad click led to this purchase".
Types of tracking pixels
| Type | How it works | Typical use | Weak spot |
|---|---|---|---|
| Image pixel | A 1x1 transparent image requested by an img tag | Email open tracking, simple page views, fallbacks | Can only report that it loaded. Blocked when remote images are off |
| JavaScript pixel (tag) | A script that runs in the browser and sends rich events | Ad platform conversion tracking, retargeting audiences, analytics | Blocked by ad blockers and limited by browser privacy rules |
| Email open pixel | An image pixel with a unique ID per recipient, inside an email | Estimating email opens | Apple and Gmail load images through proxies, so opens are inflated and locations are masked |
| Server-side pixel (postback) | Your server sends the event directly to the platform's API | Conversion reporting that does not depend on the browser | Needs click IDs and identifiers captured earlier, on the way in |
The first three run on the visitor's device. The fourth does not, which is why it is the fix for most of the losses described below. If you want the full comparison, see our guide to client-side vs server-side tracking.
Common tracking pixel examples
Almost every ad platform has its own pixel, and they all work the way described above.
| Platform | Pixel name | What it does |
|---|---|---|
| Meta (Facebook and Instagram) | Meta Pixel | Sends PageView, AddToCart, Purchase and other events for ad measurement and audiences. Pair it with the Conversions API: see Meta CAPI vs Facebook Pixel |
| Google tag (gtag.js) | Powers Google Ads conversion tracking and Google Analytics. See the Google Ads conversion tracking guide | |
| TikTok | TikTok Pixel | Reports events from your site to TikTok Ads. See TikTok Events API setup |
| Microsoft | UET (Universal Event Tracking) tag | Conversion tracking for Microsoft Advertising |
| Insight Tag | Conversion tracking and website audiences for LinkedIn Ads | |
| Pinterest Tag | Conversion tracking and audiences for Pinterest Ads | |
| Taboola | Taboola Pixel | Conversion tracking for Taboola campaigns |
Email platforms add open-tracking pixels too. If Klaviyo flows misbehave because of tracking data, see why Klaviyo browse abandonment stops working.
What are tracking pixels used for?
- Conversion tracking. A pixel on the thank-you page tells the ad platform that a click ended in a sale, so it can report results and optimise delivery.
- Retargeting. The pixel adds a visitor to an audience so you can show them follow-up ads.
- Analytics. Page views, scroll depth and funnels are all built from events fired by a pixel or tag. See the tracking audit checklist for how to check yours.
- Email engagement. Open tracking pixels estimate how many recipients loaded a message.
- Affiliate and partner attribution. A pixel or tracked link tells a partner's system that a sale came from them.
Ad platforms care about the first two most, because their bidding systems learn from the events your pixel sends. If the pixel misses sales, the platform learns from incomplete data, as we cover in how to fix iOS tracking.
Tracking pixel vs cookie
People mix these up because they usually work together. They are different things.
| Tracking pixel | Cookie | |
|---|---|---|
| What it is | A request to a server | A small piece of data stored in the browser |
| What it does | Reports an event | Remembers a value between visits |
| Does it store anything? | No | Yes |
| Needs the other? | Works without a cookie, but cannot recognise a returning visitor | Does nothing until a pixel or server reads it |
A pixel is the messenger and the cookie is the memory. When the Meta Pixel sends a purchase, it also sends the _fbp and _fbc cookie values, so Meta can connect the purchase to the browser and the ad click. Without the cookie, the pixel can still report that a purchase happened. It just cannot say who it belongs to. Click IDs follow the same pattern, and our click ID guide shows how to capture them.
Why tracking pixels miss data in 2026
A browser pixel depends on the visitor's browser cooperating. More and more often, it does not.
| Cause | What happens | Evidence |
|---|---|---|
| Ad blockers and tracker blocking | The pixel's script or request is blocked, so the event never reaches the platform | 29.5% of internet users aged 16+ use an ad blocker at least sometimes (GWI, Q2 2025). See ad blocker statistics |
| Safari's tracking prevention | Safari deletes cookies and other storage created by scripts after 7 days of browser use without the person interacting with the site. If they arrive through link decoration from a classified tracker, script-written cookies are capped at 24 hours | WebKit's tracking prevention policy |
| Apple Mail "Protect Mail Activity" | Apple Mail downloads remote content in the background when the message arrives, whether or not the person opens it, and routes the requests through relays. Email opens are inflated and locations are masked | Apple's Mail Privacy Protection documentation |
| Consent denied | In regions that require consent, a compliant site does not fire marketing pixels until the visitor agrees | EDPB Guidelines 2/2023 |
| Slow or interrupted loads | The visitor leaves before the script finishes, so the event is dropped | A common cause of small gaps between pixel and order data |
| Misconfiguration | Duplicate pixels, wrong event names, missing parameters | The most common cause, and the easiest to fix |
The Safari row is worth reading carefully, because it is often misquoted. Safari does not simply expire every cookie after a week. The 7 days counts days of browser use, and a real interaction with the site resets the clock. The 24-hour cap applies to the specific case of a visitor arriving from a domain Safari classifies as a tracker, with a query string on the landing URL.
None of this makes the pixel useless. It makes it incomplete, which is the reason most stores now run it alongside server-side tracking, and why event deduplication matters when both send the same event.
Are tracking pixels legal?
Yes, with the right consent and disclosure. The rules depend on where your visitors are, and this section is general information, not legal advice.
In the EU, the European Data Protection Board adopted its final Guidelines 2/2023 on the technical scope of Article 5(3) of the ePrivacy Directive on 7 October 2024. They state that tracking links and tracking pixels fall within Article 5(3): distributing the pixel to the user's device counts as storage, even if only through caching, and collecting the identifiers it sends back counts as gaining access to information on the device. The Guidelines apply this to email open tracking, website behaviour tracking and affiliate links.
In practice that means:
- A marketing pixel generally needs prior consent, unless an exemption such as "strictly necessary for a service the user asked for" applies. Advertising pixels do not usually qualify.
- The pixel must be disclosed in your privacy information and cookie banner.
- Email open pixels are covered too, not just website pixels.
- Moving the same events to your server does not remove the consent question. It changes where the data is sent from, not whether you may collect it.
For the technical side of consent signals and how Google handles denied consent, see Consent Mode v2 and our guide to server-side tracking and GDPR.
How to build a simple tracking pixel
You do not need a vendor to understand a pixel. This small Node server answers /p.gif with a valid 42-byte transparent GIF and logs what the request reveals. It is a teaching example, not a production system.
import { createServer } from "node:http";
// The smallest valid transparent GIF: 1x1 pixel, 42 bytes.
const PIXEL = Buffer.from("R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", "base64");
createServer((req, res) => {
const url = new URL(req.url ?? "/", "http://localhost");
if (url.pathname === "/p.gif") {
console.log({
time: new Date().toISOString(),
campaign: url.searchParams.get("c"),
page: req.headers.referer ?? null,
userAgent: req.headers["user-agent"] ?? null,
});
res.writeHead(200, {
"Content-Type": "image/gif",
"Content-Length": PIXEL.length,
"Cache-Control": "no-store",
});
res.end(PIXEL);
return;
}
res.writeHead(404).end();
}).listen(3099);
Two details matter. Cache-Control: no-store stops the browser caching the image, because a cached pixel would not fire on the next view. And the campaign value comes from the URL you chose, which is how any pixel carries custom data.
A script-based pixel sends richer events. This one fires only after consent, and uses sendBeacon so the event is not lost when the visitor leaves the page:
function sendPixelEvent(name, data = {}) {
const payload = JSON.stringify({ event: name, page: location.pathname, ...data });
navigator.sendBeacon("https://track.example.com/collect", payload);
}
// Call this only after the visitor has given marketing consent.
sendPixelEvent("purchase", { value: 49.0, currency: "USD", order_id: "1001" });
Include an order ID with purchases so the receiving system can drop duplicates, which is the same principle behind pixel and server event deduplication.
How to check that a tracking pixel is firing
- Open your browser's developer tools and go to the Network tab. Reload the page and filter for the platform's domain, for example
facebook.com/trfor Meta. A request that returns a successful status means the pixel fired. - Check the event name and parameters in the request. A purchase event without a value or currency is a common mistake.
- Use the platform's own tools. Meta's Events Manager has a Test Events tab, and Meta Pixel Helper and Google Tag Assistant are browser tools that show what fired. TikTok and Microsoft offer similar helpers.
- Test with an ad blocker on and off. If the event disappears with the blocker on, you have found a gap a server-side connection would fill.
- Compare with your real orders. Count pixel-reported purchases against orders in your store over the same period. A consistent shortfall is the fingerprint of blocked or lost pixel events.
If any of this fails on Shopify, see why your Shopify Facebook Pixel is not working.
How to block or reduce tracking pixels
If you are a visitor rather than a marketer, these steps cut most pixel tracking:
- Use an ad or tracker blocker or a browser with built-in tracker blocking.
- Turn off automatic remote image loading in your email app, or turn on Apple Mail's Protect Mail Activity, so email pixels do not reveal when you read a message.
- Decline marketing cookies when a site asks.
- Use private browsing with tracking protection turned up for sensitive browsing.
No single step stops everything. A blocker stops requests to known tracker domains, but it cannot stop a site that measures you with its own server.
Pixel tracking and server-side tracking together
The pixel is not going away, and it should not. It is the fastest way to start, it feeds ad platforms in real time, and it is how most audiences are built. Its weakness is that it lives in a browser you do not control.
The reliable setup is both: keep the pixel, add events sent from your server with the same event ID, and let the platform deduplicate. That recovers the conversions the pixel misses without losing the ones it catches. The full explanation is in what is server-side tracking, and best conversion tracking tools for e-commerce compares the tools.
SignalBridge is one way to do this for Shopify and other stores without writing code: it captures click IDs and UTM parameters on your own domain once marketing consent is given, then sends the conversion from the server to Meta, Google, TikTok and other platforms.
Tracking pixel checklist
- List every pixel and tag on your site, including old ones nobody owns
- Confirm each one only fires after the right consent
- Check that every purchase event carries value, currency and an order or event ID
- Test the pixels with an ad blocker on and off
- Compare pixel-reported purchases with real orders for the last 30 days
- Add server-side events for the platforms that matter most, with deduplication
- Disclose each pixel in your privacy notice
Frequently Asked Questions
What is a tracking pixel?
A tracking pixel is a small piece of code on a web page or in an email that makes the visitor's browser or email app send a request to a tracking server. The server logs the request, so it knows the page or email was viewed. Historically it was a 1x1 transparent image, and today it is usually a script.
What is pixel tracking?
Pixel tracking is the practice of using tracking pixels to measure what people do on a website or with an email. It is used for conversion tracking, retargeting, analytics and email open measurement. Each action sends a request to the pixel's server, and the server records it.
How do tracking pixels work?
When a page or email loads, the browser or email app requests the pixel's URL, or runs the pixel's script. The request carries data such as the IP address, browser and page, plus any custom values the pixel adds. The server logs it, which is the tracking.
What are tracking pixels used for?
Mainly for conversion tracking, retargeting, website analytics and email open tracking. Ad platforms use the events a pixel sends to report results and to decide who sees your ads. Email tools use them to estimate whether a message was opened.
What are tracking pixels?
They are small requests, historically transparent 1x1 images and now mostly scripts, that report an event to a server. Examples include the Meta Pixel, Google tag, TikTok Pixel, LinkedIn Insight Tag, Pinterest Tag, Microsoft UET tag and the open-tracking pixels inside marketing emails.
Is a tracking pixel the same as a cookie?
No. A pixel is a request that reports an event, and a cookie is a small piece of data stored in the browser. They work together: the pixel sends the cookie's value with its request so the server can recognise a returning visitor. A pixel can work without a cookie, but then it cannot tell who the event belongs to.
Is the Meta Pixel a tracking pixel?
Yes. The Meta Pixel is a script that sends events such as page views and purchases from the visitor's browser to Meta, and it includes an image pixel fallback for browsers without scripts. It is best paired with the Conversions API so that blocked events are recovered.
Are tracking pixels legal?
Yes, with proper consent and disclosure. In the EU, the EDPB's Guidelines 2/2023 say pixel tracking falls under Article 5(3) of the ePrivacy Directive, so marketing pixels generally need prior consent. Rules differ by country, so take legal advice for your situation.
Can a tracking pixel see my personal information?
A pixel receives your IP address, browser details and whatever the site attaches to the request, such as an order value or a hashed email. It cannot read your files or your other tabs. What it can identify depends on what the site and the platform connect it to, which is why consent rules apply.
How do I know if a website has a tracking pixel?
Open your browser's developer tools, go to the Network tab and reload the page. Requests to domains such as facebook.com, google-analytics.com, analytics.tiktok.com or ads.linkedin.com are tracking pixels firing. Browser extensions such as Meta Pixel Helper also list them.
How do I block tracking pixels?
Use an ad or tracker blocker, decline marketing cookies, and stop your email app loading remote images automatically. In Apple Mail, turn on Protect Mail Activity so senders cannot see when you opened a message. These steps reduce pixel tracking but cannot stop a site's own server-side measurement.
Why is my tracking pixel not firing?
Common causes are an ad blocker, a consent banner that has not been accepted, a script error, a wrong pixel ID, or the visitor leaving before the script finished. Check the Network tab for the request, then the platform's test tool. If events fire in testing but are missing in reports, see our tracking audit checklist.
Related Reading
Related Articles
iOS 26 and iOS 27 Tracking Changes: What Marketers Need to Know
There is no iOS 19. Apple jumped from iOS 18 to iOS 26, and iOS 27 shipped in September 2026. Here is what changed for ad tracking, and what to do.
What Is a GCLID? Every Ad Click ID Explained (2026)
A GCLID is the click ID Google Ads adds to your ad URLs. Learn what GCLID, GBRAID, FBCLID, MSCLKID and TTCLID do, where they get lost, and how to keep them.