A tracking pixel is a small piece of code on your website that tells an ad platform, such as Meta or TikTok, what a visitor did after clicking your ad. You need one if you pay for ads and want to know which ads bring enquiries. If you do not run ads, you can usually live without it.
What a tracking pixel does, in plain words
The name comes from the early web, when a pixel was a tiny invisible image. Today it is normally a short script, but the idea is the same.
Here is what happens:
- Someone sees your ad and clicks it.
- They land on your website. The pixel loads with the page.
- The pixel sends a short message to the ad platform: this browser visited this page.
- When the visitor does something useful, such as sending your contact form, the pixel sends a second message. This is called an event or a conversion.
- The ad platform matches that message to the ad that was clicked.
The result is a simple report. You see which ad led to an enquiry and which ad only led to a visit.
What you can do with it
A pixel has three practical uses for a small business.
- Measure. You see how many enquiries, bookings or purchases came from each ad. Without this you only see clicks, and clicks do not pay the bills.
- Let the platform learn. Ad platforms try to show your ad to people who are likely to do what you ask for. If the platform knows who sent a form, it can look for similar people. If it only knows who clicked, it looks for people who click.
- Remind past visitors. You can show ads to people who visited your site but did not get in touch. This is called retargeting.
A pixel does not improve a weak ad or a slow page. It only shows you what is happening. It also never gives a full picture. Ad blockers, browser privacy settings and visitors who decline cookies all leave gaps. Treat the numbers as a good estimate, not as an exact count.
Do you need one? A quick test
| Your situation | Pixel needed? |
|---|---|
| You do not run paid ads and do not plan to | No. Simple website statistics are enough. |
| You plan to run ads in the next few months | Useful to prepare, so it works from the first day of the campaign. |
| You run Meta or TikTok ads that send people to your website | Yes. Without it you are guessing. |
| Your ads use a form inside the app, and nobody visits your site | Not strictly. The platform counts those forms itself. |
| You only want to count phone calls | A pixel can count taps on a phone link, but not what was said on the call. |
If you are not sure, ask one question: will I make a decision based on this data? If the answer is no, leave it out. Every extra script slows your site a little and adds one more thing to explain in your privacy policy.
Consent: the part many small sites get wrong
In the EU and the UK, an advertising pixel needs the visitor's consent before it loads. This comes from the cookie rules (the ePrivacy rules in the EU, PECR in the UK) together with data protection law. In practice this means:
- The pixel must stay switched off until the visitor clicks accept in your cookie banner.
- Declining must be as easy as accepting. A banner with only an OK button is not consent.
- If the visitor declines, the pixel must not load at all. Hiding the banner is not enough.
- Your privacy policy should name the pixel, the company behind it and what it is used for.
In the United States there is no single national cookie consent rule, but several states have privacy laws with their own notice and opt-out duties. Rules differ by country and they change. This is general information, not legal advice. If you have doubts, ask a privacy professional.
One honest consequence: some visitors will decline, so your reports will show fewer conversions than really happened. That is normal.
How to set one up in five steps
- Create the pixel in your own ad account. In Meta this happens in Events Manager, in TikTok in the Events section of Ads Manager. Keep the account in your name so you keep the data if you change agency.
- Add the code to your site. Most website builders have a field for the pixel ID. Otherwise the code goes into the head of every page, or into a tag manager.
- Connect it to your cookie banner. The pixel should fire only after consent. Test this in a private browser window.
- Define one or two events. For most local businesses one is enough: the enquiry was sent. A thank-you page after the form makes this easy to count.
- Test it. Both platforms offer a test tool and a browser helper that show whether events arrive. Send a test enquiry yourself and check that it is counted once, not twice.
Common mistakes and where to get help
- The pixel fires before consent, or fires even after a visitor declined.
- The same pixel is installed twice, so every enquiry counts double.
- The event counts page views of the contact page, not sent forms.
- The pixel lives in an agency's account, and the data is lost when the contract ends.
- Nobody looks at the reports.
Before you spend, also check the page your ads lead to. Our landing page checklist covers that. If you would rather not set this up yourself, Astranode offers an ads setup service by quote. It covers the ad account, the pixel and tracking, the first campaigns and the landing page. You pay the ad budget directly to the platform, and nobody can honestly promise you results.
A pixel is a measuring tool for paid ads. Install it only if you will use the data, and in the EU and UK let it load only after the visitor has agreed.