---
title: "What Is a Tracking Pixel? How It Works + Which Ones You Need"
description: "A tracking pixel is code that tells Google, Meta or TikTok when someone visits or converts. How pixels work, which ones you need, how to install and test them."
url: "https://www.shaheeralikhan.com/what-is-a-tracking-pixel"
---

# What Is a Tracking Pixel (and Which Ones Do You Need)?

**Quick answer:** a tracking pixel is a **small piece of code on your website or in an email that tells a platform when someone visits or takes an action**, such as submitting a form or buying. Ad platforms use it to count conversions, build retargeting audiences and decide who to show ads to. Most small businesses need the Google tag (Analytics + Ads) and, if they advertise there, the Meta Pixel, all installed through Google Tag Manager with a consent banner. Use the planner below to get your list.

By [Shaheer Ali Khan](https://www.shaheeralikhan.com/about-me) - independent SEO and digital marketing consultant in Mississauga, working since 2018 - Published November 17, 2026

## Which tracking pixels do I need?

Tick what you use. You get the exact tags to install, the events to track and the order to do it in.

Platforms you use or plan to advertise on

- Google Analytics 4
- Google Ads
- Facebook / Instagram ads
- TikTok ads
- LinkedIn ads
- Microsoft (Bing) Ads

What counts as a win on your site?

I have visitors or customers in Quebec

### 1\. Install Google Tag Manager once

One container snippet in your site's head and body. Every tag below then goes in through Tag Manager, not into your site's code.

### 2\. Add these tags (3)

- **Google Analytics 4:** Google tag (gtag.js) with your GA4 measurement ID. Mark your lead or purchase events as key events.
- **Google Ads:** Google tag with your Google Ads conversion ID + a conversion action per goal. Turn on enhanced conversions so hashed email or phone improves matching.
- **Facebook / Instagram ads:** Meta Pixel. Add the Conversions API (server-side) so events still count when browsers block the pixel.

### 3\. Track these events on every tag

- Form submitted (thank-you page view or submit event)
- Phone number clicked (tel: link)
- Booking completed
- Chat started

### 4\. Add consent before tags fire

Use a consent banner connected to Google Consent Mode, and update your privacy policy to name each tool.

### 5\. Test before you spend

Use Tag Assistant (Google), Test Events in Meta Events Manager and each platform's diagnostics. Submit a real test lead or order and confirm it shows up once, not twice.

## How does a tracking pixel work, step by step?

1. A visitor lands on your page from an ad, a search or an email.
2. The page loads the pixel code (for example the Meta Pixel or the Google tag).
3. The code sends an event to the platform: "PageView" now, and "Lead" or "Purchase" when they convert.
4. The platform matches the event to a person or browser using a cookie, a login or hashed contact details.
5. That match is used to report the conversion against the right ad, add the visitor to retargeting audiences and teach the algorithm who converts.

The original pixel was literally a 1x1 transparent GIF: when it loaded, the server logged the request. Email open tracking still works this way. Ad pixels today are JavaScript, which lets them send richer events such as order value.

## What are the main types of tracking pixels?

__Types of tracking pixels and what they are for__
| Type               | Examples                                                 | What it does                                                                             |
| ------------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| Conversion pixel   | Google Ads conversion tag, Meta Pixel "Lead" event       | Counts leads and sales from each ad so you can see cost per result                       |
| Retargeting pixel  | Meta Pixel, Google Ads remarketing, LinkedIn Insight Tag | Builds audiences of past visitors to show ads to again                                   |
| Analytics tag      | Google Analytics 4                                       | Measures all traffic and behaviour, not just ad clicks                                   |
| Email open pixel   | Built into Mailchimp, Klaviyo and others                 | Records opens (unreliable since Apple Mail Privacy Protection)                           |
| Server-side events | Meta Conversions API, Google enhanced conversions        | Sends conversions from your server, so ad blockers and browser limits lose fewer of them |

Planning retargeting? The [ad retargeting calculator](https://www.shaheeralikhan.com/tools/ad-retargeting-calculator) estimates audience size and cost from your traffic.

## How do I install a tracking pixel on my website?

1. **Create a Google Tag Manager account** and add its two snippets to every page (most website builders have a field for the container ID).
2. **Add each platform's tag inside Tag Manager**, triggered on all pages.
3. **Create conversion triggers:** a thank-you page view, a form submit, a click on a tel: link, or a purchase event from your store.
4. **Connect the consent banner** so tags only fire with permission where required.
5. **Publish and test** with Tag Assistant and Meta's Test Events, using a real submission.

Shopify, Wix and Squarespace have native integrations for Google and Meta that handle purchase events for you; use them for e-commerce and Tag Manager for everything else. Tag your ad links with the [UTM builder](https://www.shaheeralikhan.com/tools/utm-builder) so Analytics can tell your campaigns apart.

## How do I check if my tracking pixel is working?

- **Google:** Tag Assistant shows which Google tags fire on each page and which events they send. In Google Ads, a conversion action shows "Recording conversions" once it has data.
- **Meta:** Events Manager -> Test Events shows events from your browser live. The Meta Pixel Helper browser extension flags errors.
- **Every platform:** submit one real test lead or order and confirm it appears once. Double-counting is as common as missing data, and it makes ads look better than they are.

## Do I need consent to use tracking pixels in Canada?

You need meaningful consent and a clear privacy policy under PIPEDA, and Quebec's Law 25 requires tracking technologies that can identify, locate or profile someone to be off by default. In practice, for most small businesses that means:

- A consent banner that lets visitors accept or refuse analytics and advertising cookies, connected to Google Consent Mode.
- A privacy policy that names the tools you use (Google Analytics, Google Ads, Meta, etc.) and what they collect.
- No pixels on pages with sensitive information, such as health intake forms.

This is general information, not legal advice. Check with a privacy lawyer if you handle sensitive data.

## Why do my pixel numbers not match my real sales?

Pixels miss some conversions and sometimes double-count others. Common causes:

- Ad blockers, browser tracking protection and visitors who refuse consent.
- People who click an ad on their phone and call or buy later on another device.
- Different attribution windows: Meta and Google may both claim the same sale.
- A conversion tag firing on page reload or on more than one page.

Server-side events (Meta Conversions API, Google enhanced conversions) recover part of the gap. For the real answer, compare total leads or sales in your own system against total ad spend each month, and work out your [true cost per lead](https://www.shaheeralikhan.com/tools/cost-per-lead-calculator).

## Frequently asked questions

### What is a tracking pixel?

A tracking pixel is a small piece of code on a website or in an email that tells a platform when someone views a page or takes an action, such as filling in a form or buying. The name comes from the original version: a 1x1 transparent image that loads from the platform's server. Most modern ad pixels are JavaScript tags that send the same kind of signal.

### How does a tracking pixel work?

When the page or email loads, the pixel sends a request to the platform's server with details such as the page address, the event that happened, the time, and an identifier from a cookie or the logged-in account. The platform uses that to count conversions, build retargeting audiences and optimise ad delivery.

### What is the difference between a pixel and a cookie?

A cookie is a small file stored in the browser that remembers an identifier. A pixel is the code that sends an event to a server. They usually work together: the pixel reads the cookie so the platform knows the same browser came back. Server-side tools such as the Meta Conversions API send events without relying only on the browser.

### Do I need a Meta Pixel if I do not run Facebook ads?

Not now, but installing it early has one benefit: it starts building a retargeting audience of your site visitors, so you can advertise to them later. If you have no plans to advertise on Meta, leave it off; every extra tag is more to maintain and to disclose in your privacy policy.

### Are tracking pixels legal in Canada?

Yes, with conditions. Under federal privacy law (PIPEDA) you need meaningful consent and a clear privacy policy that explains what you collect and why. Quebec's Law 25 goes further and requires technologies that can identify, locate or profile visitors to be off by default until the visitor turns them on. Get advice for your specific situation if you handle sensitive data such as health information.

### What is an email tracking pixel?

An email tracking pixel is a tiny image in an email that records an open when it loads. Open rates have become unreliable because Apple Mail Privacy Protection preloads images for many users, which counts opens that did not happen. Judge email campaigns on clicks, replies and sales instead.

## Sources

- [Meta for Developers -- Meta Pixel](https://developers.facebook.com/docs/meta-pixel/)
- [Google for Developers -- Google tag (gtag.js)](https://developers.google.com/tag-platform/gtagjs)
- [Office of the Privacy Commissioner of Canada](https://www.priv.gc.ca/en/)

## Related guides and tools

[Digital marketing strategy for small business 7 steps and a 90-day plan builder](https://www.shaheeralikhan.com/digital-marketing-strategy-for-small-business) [Content marketing strategy Topic plan builder from your services and cities](https://www.shaheeralikhan.com/content-marketing-strategy) [Customer avatar worksheet Fill-in worksheet that builds a one-page avatar](https://www.shaheeralikhan.com/customer-avatar-worksheet) [Lead magnet ideas 40 ideas by industry, with a picker](https://www.shaheeralikhan.com/lead-magnet-ideas) [Email marketing strategy List revenue estimator and 5 core emails (CASL-safe)](https://www.shaheeralikhan.com/email-marketing-strategy-for-small-business) [UTM builder Tag every ad and email link](https://www.shaheeralikhan.com/tools/utm-builder) [Ad retargeting calculator Audience size and cost from your traffic](https://www.shaheeralikhan.com/tools/ad-retargeting-calculator)

## Not sure your tracking is right?

Send your website. We check which tags fire, whether conversions are counted once, and what is missing -- free, within 2 business days.

[Get a free tracking check](https://www.shaheeralikhan.com/seo-strategy-call)
