Business & growth

What is a tracking pixel?

A tracking pixel is a small piece of code, historically a one-pixel image, placed on a page to report visitor activity back to an advertising or analytics platform.

New to Bolt? Sign up free.

Technical definition

The original implementation was an invisible image whose request to a remote server logged the visit. Current implementations are JavaScript snippets that fire events on page load and on defined actions such as a purchase or a form submission, sending them to the platform along with identifiers that allow matching to a user profile.

Pixels are what make conversion tracking and retargeting possible in advertising platforms. Because they collect personal data and set cookies, they fall under consent requirements in the EU and similar regimes, and must not fire before consent is recorded.

In plain terms

A snippet of code from an ad platform that sits on your site and reports back what visitors do.

It is how a platform knows that the person who clicked your ad on Monday bought something on Thursday, and how the same product follows people around the internet afterward.

Why it matters

Without a pixel, an advertising platform cannot tell you which ads produced sales, only which produced clicks. That is the difference between optimizing spend and guessing at it.

The part small businesses get wrong is consent sequencing. A pixel installed in the site header fires the moment the page loads, before anyone touches the cookie banner, which makes the banner decorative. Load advertising and analytics pixels only after consent, audit which ones are on your site at least once a year, and remove the ones from platforms you no longer use, since each one is data leaving your site and a small cost to page speed.