Meta Pixel Setup: Tracking Events Correctly From the Start
How to set up the Meta Pixel with the right events, avoid duplicate and misfiring events, add the Conversions API and test it.

On this page
The Meta Pixel is a piece of code on your website that records actions visitors take, such as viewing a page, submitting a form or completing a purchase, and sends them to Meta. Those events let Meta report which ads produced results, build retargeting audiences and, most importantly, optimise delivery toward people likely to take the actions you care about. A badly set-up pixel quietly undermines every campaign that depends on it.
Setting it up is technically simple. Setting it up correctly, with the right events, values and deduplication, takes more care.
What the pixel needs to do
For most businesses, the pixel should track:
- PageView on every page, which the base code handles automatically.
- The main conversion event: Purchase for ecommerce, Lead for form submissions, Schedule or a custom event for bookings.
- Supporting funnel events: ViewContent, AddToCart and InitiateCheckout for stores; key page views or form starts for lead generation.
Every event should fire once per action, at the right moment, with accurate parameters such as value and currency for purchases.
Installation options
Platform integrations
Shopify, WooCommerce, Wix, Squarespace and many other platforms have official Meta integrations that install the pixel and standard ecommerce events, often with the Conversions API included. For stores, this is usually the best starting point.
Google Tag Manager
For custom sites or detailed control, Tag Manager lets you install the base code and fire events based on triggers, such as a thank-you page view or a form submission event. It requires careful testing.
Manual code
Developers can add the base code to the site header and event code where actions occur. This offers full control but needs ongoing maintenance as the site changes.
Common setup problems
Duplicate pixels. A theme, a plugin and a Tag Manager container all installing the pixel results in double-counted events. Meta Pixel Helper, a browser extension, shows how many pixels and events fire on a page.
Lead events on page load. Firing a Lead event when the contact page loads, rather than when the form is submitted, makes every visitor look like a lead.
Thank-you pages that are reachable directly. If the confirmation page can be visited without submitting a form, conversions are over-counted.
Missing purchase values. Purchase events without value data prevent ROAS reporting and value-based optimisation.
Wrong currency. A store selling in one currency while reporting another distorts results.
Forms in iframes or third-party tools. Embedded booking widgets and forms often run in their own domain, so the pixel on your site cannot see submissions. These need the provider’s own Meta integration or a redirect to a thank-you page on your domain.
Add the Conversions API
Browser tracking alone misses conversions due to ad blockers, browser privacy features and cookie consent choices. The Conversions API sends events from your server or platform directly to Meta. Running both together, with matching event IDs for deduplication, gives Meta more complete data. Our Conversions API guide explains the setup.
Privacy and consent
Depending on where your customers are, privacy law may require consent before tracking cookies are set. Visitors from the UK and EU are covered by consent requirements, and several US states have their own privacy laws. Use a consent management platform where required, and make sure your privacy policy explains the tracking. This is general information, not legal advice; check your obligations for your markets.
Meta’s terms also restrict sending certain sensitive information. Avoid passing health details, financial details or other sensitive data in URLs or event parameters.
Testing your setup
Use Events Manager’s Test Events tool to perform each action on your site and confirm the right event appears once, with correct parameters. Check the Overview tab for event volumes over time, and the Diagnostics tab for warnings. Event match quality scores show how well Meta can connect events to users; adding hashed customer information through the Conversions API usually improves them.
Compare Meta’s reported conversion counts with your actual orders or form submissions over a week. Large differences point to setup problems.
Domain verification and event configuration
Verify your domain in Business Settings so you can manage which events are used and protect your domain’s data. Review event settings after major site changes, such as a new checkout or form provider, since these often break tracking silently.
Tracking you can trust
Every Meta campaign optimises toward the events your pixel sends. Accurate tracking is therefore not just a reporting issue; it determines who your ads are shown to.
If you are not confident your pixel is counting conversions correctly, our Meta Ads management service includes a tracking audit and setup of the pixel and Conversions API before campaigns are scaled. For broader analytics setup, see our guide to website analytics setup.