Skip to content
Rapid

Marketing

Meta Pixel setup: how to install the Pixel and Conversions API

A step-by-step guide to installing the Meta Pixel and Conversions API, so your Facebook and Instagram ads learn from real sales and leads.

Rapid Action Team · · 11 min read

Close-up of an analytics dashboard on a monitor showing user activity by weekly cohort

Key takeaways

  • The Pixel tracks actions in the browser, while the Conversions API sends the same actions from your server, so running both gives Meta a fuller picture.
  • Every event sent by both the browser and the server needs a matching event ID and event name, or Meta will count it twice.
  • Use the Test Events tool and Event Match Quality score in Events Manager to confirm your setup before you spend money on ads.
  • In the UK, the Pixel should only fire after a visitor has given consent to marketing cookies.

If you run Facebook or Instagram ads and your tracking is patchy, Meta is optimising your campaigns half blind. It can only find more people like your customers if it can see who actually became a customer. That is the job of the Meta Pixel and its server-side partner, the Conversions API.

This guide walks through a complete Meta Pixel setup in the current version of Events Manager, then adds the Conversions API, deduplication and testing. It is written for small business owners and marketers who want to understand what they are installing, whether they do it themselves or hand it to a developer.

What the Meta Pixel and Conversions API actually do

The Meta Pixel is a short piece of JavaScript that loads on your website. When someone views a page, adds a product to their basket or submits an enquiry form, the Pixel sends that action (an "event") to Meta from the visitor's browser.

The Conversions API (often shortened to CAPI) sends the same kind of events, but from your server or a hosted service rather than from the browser. Because it does not rely on the visitor's browser, it is less affected by ad blockers, browser privacy features and pages closing before a script has finished loading.

Meta now groups both under a single dataset. In Events Manager you will see the terms dataset, Pixel and Pixel ID used almost interchangeably. Your dataset ID is the same number as your Pixel ID.

Meta PixelConversions API
Where it runsVisitor's browserYour server or a hosted gateway
Setup effortLow, often a plugin or copy and pasteModerate, depends on your platform
Affected by ad blockersYesLargely no
Can send offline or CRM eventsNoYes
Best usedTogether with CAPITogether with the Pixel

Meta recommends running both side by side. The Pixel captures rich browser signals; the Conversions API fills in the gaps. Used together and deduplicated properly, they give your campaigns the most reliable signal you can send.

What you need before you start

Gather these before you open Events Manager. It saves a lot of back and forth.

  • Admin access to your Meta business portfolio (formerly Business Manager) and the ad account you will advertise from.
  • Access to your website, either the CMS admin (Shopify, WordPress, Wix and so on) or someone who can edit the code.
  • A list of the actions that matter to your business. For an online shop that is usually ViewContent, AddToCart, InitiateCheckout and Purchase. For a service business it is typically Lead, Contact or a booking.
  • A cookie consent tool that can hold back marketing scripts until a visitor agrees.
  • Your domain verified in Meta, or at least access to your DNS or site header so you can verify it.

Step 1: create your dataset in Events Manager

The flow below reflects how Events Manager works at the time of writing. Meta changes labels from time to time, so if a button has moved, look for the nearest equivalent.

  1. Go to Meta Events Manager and check that the correct business portfolio is selected in the top left.
  2. Click Connect data (the green button, or the plus icon in the left menu).
  3. Choose Web and click Next.
  4. Select Create new dataset, give it a clear name such as your business name plus "website", and click Create.
  5. When asked how you want to connect your website, Meta will usually offer the option of setting up the Meta Pixel and Conversions API together, or the Pixel only. If you are on a platform with a good partner integration, choose both.

Once the dataset exists, you can find its ID at any time by opening it and going to the Settings tab.

Step 2: install the Pixel on your website

You have three realistic routes. Pick the one that matches how your site is built.

Partner integrations

If your site runs on Shopify, WooCommerce, WordPress, Wix, Squarespace or a similar platform, a partner integration is usually the quickest and most reliable option. Events Manager will walk you through connecting your account, or you install Meta's official app or plugin from inside your platform. Many of these integrations also switch on the Conversions API for you, which saves a step later.

Manual installation

For custom-built sites, Events Manager gives you a block of base code containing your Pixel ID. It needs to go into the head section of every page, ideally in a shared layout or template so you only add it once. You then add event code for each specific action, for example a Lead event when the thank-you message appears after a form submission.

If you are working with a developer, the setup flow has an option to email the instructions directly to them.

Google Tag Manager

If your site already uses Google Tag Manager, you can deploy the Pixel from there. This keeps your marketing tags in one place and makes it easier to tie the Pixel to your consent tool's triggers. It does require a little care to get event parameters such as value and currency passed through correctly.

Step 3: choose your events and parameters

Meta has a set of standard events with names it recognises, such as PageView, ViewContent, AddToCart, InitiateCheckout, Purchase, Lead, CompleteRegistration, Contact and Schedule. Use these wherever they fit, because Meta's delivery system understands them out of the box.

For each event, send useful parameters:

  • Purchase: value, currency (GBP for most UK businesses) and the product IDs or content IDs.
  • Lead: a value if you can estimate one, and the form or service type as a custom parameter.
  • ViewContent and AddToCart: product IDs that match your catalogue, if you plan to run dynamic product ads.

If an action does not fit a standard event, you can create a custom conversion in Events Manager based on a URL rule or an event with particular parameters. Keep the list focused. Five well-defined events are far more useful than twenty vague ones.

Turn on automatic advanced matching in your dataset settings as well. This lets the Pixel send hashed customer details, such as an email address typed into a form, which helps Meta match the event to a real account.

Hands on a laptop showing a Facebook business page while holding a phone
Good tracking turns ad spend into data you can act on.

Step 4: set up the Conversions API

There are four main ways to add the Conversions API. The right one depends on your platform, budget and how much control you need.

MethodGood forEffortNotes
Partner integrationShopify, WooCommerce and other supported platformsLowOften enabled with a toggle
Conversions API GatewaySites without a partner integration that want a no-code optionLow to moderateRuns on a cloud host, usually with a monthly fee
Server-side Google Tag ManagerBusinesses already using GTM and tracking several ad platformsModerateNeeds a server container and hosting
Direct integrationCustom sites, apps and CRM or offline eventsHighRequires a developer and an access token

Using a partner integration or the Gateway

In Events Manager, open your dataset, go to Settings and scroll to the Conversions API section. From there you can choose to set up through a partner, set up the Conversions API Gateway, or generate an access token for a manual integration. Follow the prompts for your chosen route.

Going direct

For a direct integration, your developer generates an access token in the same Settings area and sends events to Meta's Graph API from your server. Each event needs, at minimum, an event name, an event time, an action source (website, for example) and customer information. Personal details such as email and phone number must be normalised and hashed with SHA-256 before sending. The browser cookie values known as fbp and fbc are sent as they are, not hashed.

A direct setup is the most work, but it is the only option that lets you send events your website never sees, such as a lead that turns into a paying customer in your CRM weeks later. For lead generation businesses, that downstream data is often where the real improvement comes from.

Step 5: deduplicate browser and server events

When the Pixel and Conversions API both report the same purchase, Meta needs to know it is one purchase, not two. It does this by comparing two fields:

  • the event name, which must be identical in both (Purchase and Purchase, not Purchase and purchase), and
  • the event ID, a unique string you generate for each action and send with both the browser event and the server event.

According to Meta's developer documentation on deduplication, matching events are deduplicated within a 48-hour window. If the IDs do not match, both events are counted and your reported conversions will look better than they really are, which also misleads the algorithm.

Step 6: verify your domain and review event settings

Domain verification proves to Meta that you control your website. It is done in your business portfolio settings, under the brand safety section, by adding a DNS TXT record, a meta tag or an uploaded HTML file. It is worth doing for any business that advertises a website, as it protects your domain from misuse and is needed for some event configuration options.

You may read older guides telling you to rank eight events in order of priority under Aggregated Event Measurement. Meta has since relaxed those rules, and most advertisers no longer need to configure that manually. If you see a prompt about event configuration in Events Manager, follow what it asks for, but do not go looking for the old eight-event screen.

Step 7: test before you spend

Never launch a conversion campaign on untested tracking. Use these checks:

  1. Test Events tab. In Events Manager, open your dataset and click Test events. Enter your website address, browse the site, add to basket, submit a test form and watch the events arrive. Server events can be tested using the test event code shown on the same tab.
  2. Meta Pixel Helper. This free Chrome extension shows which Pixel events fire on each page and flags errors such as missing parameters.
  3. Overview and diagnostics. After a day or two, the Overview tab shows whether events are being received from the browser, the server or both, and the Diagnostics tab lists problems Meta has spotted.
  4. Event Match Quality. For each event, Meta gives a score out of 10 that reflects how well your customer information helps match events to real people. Higher is better. Adding a hashed email address to server events is usually the biggest single improvement.

Finally, compare Meta's figures against your own system for a week. They will never agree perfectly, because of attribution windows and consent choices, but they should be in the same ballpark.

The Pixel sets and reads cookies, so under UK GDPR and PECR it generally needs the visitor's consent before it loads. In practice, that means your cookie banner must block the Pixel until someone accepts marketing cookies, and the "reject" option must be as easy to use as "accept". The ICO's guidance on cookies is the place to start.

The Conversions API does not get a free pass. If you are sending personal data about website visitors to Meta from your server, you still need a lawful basis and a clear privacy notice, and many businesses choose to respect the same consent choice on the server side. If you are unsure, take proper advice rather than guessing.

If this all feels like a lot to wire up, it is exactly the kind of thing we handle as part of our Meta Ads management service, from the first event to the final check.

FAQs

Do I still need the Meta Pixel if I use the Conversions API?

Yes, in most cases. Meta recommends using both together. The Pixel picks up browser signals the server does not see, and the Conversions API covers events the browser misses. Deduplication stops them double counting.

Where do I find my Meta Pixel ID?

Open Events Manager, select your dataset from the list on the left and go to the Settings tab. The dataset ID shown there is your Pixel ID.

Why is my Meta Pixel not firing?

The most common causes are the code not being on every page, a consent banner that never releases the script, a caching or optimisation plugin stripping the code, or the wrong Pixel ID. The Meta Pixel Helper extension and the Test Events tab will usually show you which one it is.

Is the Conversions API free?

Meta does not charge for the Conversions API itself. Costs come from how you set it up: partner integrations are often free, while the Conversions API Gateway and server-side tag manager need hosting, and a direct integration needs developer time.

How long does it take for events to show in Events Manager?

Test events appear within seconds. Standard reporting in the Overview tab can take from a few minutes up to around an hour to update.

Not sure whether your current tracking is sending Meta the right signals? Get a free audit and we will check your Pixel, Conversions API and deduplication, or book a call to talk it through.

Get the next one by email.

The Rapid Brief. One short email a month. No fluff.

By subscribing you agree to our Privacy Policy. Unsubscribe anytime.

Let's get your project moving.

Book a call, tell us what you need and get a written quote.

Free call. No obligation.