Ad tracking: Meta
Send your site's page views and form submissions to Meta through the Conversions API, so Facebook and Instagram ads can measure conversions.
Ad Tracking sends what visitors do on your site to the ad platforms you advertise on. Meta is the first platform there: page views and form submissions go server-side to your Meta Pixel through the Conversions API (CAPI). Because the events are sent from the server rather than only from the browser, they keep arriving even when a visitor's browser blocks scripts or cookies, which gives Meta more reliable data for measuring and optimising your Facebook and Instagram ads.
You connect it per project, under Ad Tracking in the project sidebar.
Note: This is separate from the conversion goals counted by the built-in tracker (shown in your site analytics). Ad tracking only passes events on to the ad platforms you connect.
What it sends
| Event | When |
|---|---|
| Page views | Every page a visitor opens. |
| Form submissions | Each form sent on the site, as a Meta Lead event. Contact details are hashed before they leave the server. |
| Custom events | Anything the site reports on its own, such as a click on a call to action. |
No extra code is needed on your side.
Meta receives these events only from visitors who accept Marketing cookies in your site's cookie banner. Nothing is sent for visitors who decline or don't answer, so Meta reports fewer conversions than your forms receive. For the same reason, connecting Meta requires the cookie banner first.
Connect Meta
- Set up the cookie banner if the site does not have one yet.
- Open your project from the dashboard.
- In the left sidebar, click Ad Tracking, then Set up next to Meta.
- Click Connect with Meta, log in, and choose your business portfolio and pixel in the Meta dialog. You need admin access to that business portfolio.
- If you shared more than one pixel, pick the one this website should use.
If the Connect with Meta button is not there, or you prefer to do it by hand, click or set up manually and fill in the form:
| Field | Required | Notes |
|---|---|---|
| Pixel ID | Yes | The numeric ID from the top of your pixel's page in Meta Events Manager, such as 675345502247325. |
| Access token | Yes | In Events Manager, open the pixel's Settings, scroll to Conversions API and click Generate access token. |
| Test event code | No | Shows your events under Test events in Events Manager while you check the setup. |
Then click Connect.
Publish the change
- After connecting, a green Saved notice appears: changes take effect after the next deploy.
- Click Deploy now to publish immediately, or let the change go out with your next publish.
Note: Events only start flowing after a deploy, once someone visits the site.
Check that events arrive
Once connected, the Meta page shows:
- Connection: the pixel, the business portfolio that owns it, and the test event code if you set one.
- Event delivery: Receiving events with the time of the last one, Waiting for the first event before anything has arrived, or a red warning when Meta has heard nothing for over a week.
- Tracked events: how many of each event Meta received in the last 7 days, when Meta shares those counts with the connection.
Test connection asks Meta again. While you are setting things up, a Test event code makes your events show up under Test events in Events Manager as well.
Change or disconnect
- Manage connection lets you reconnect with Meta to pick a different business or pixel, or edit the pixel ID, token and test event code by hand. The access token stays masked: enter a new one to replace it, or leave it as it is.
- Disconnect removes the connection after you confirm. A deploy applies the change.
Consent and the Meta Pixel
The browser-side Meta Pixel counts as a Marketing script, so if you run a cookie-consent banner it only loads after a visitor accepts. The server-side Conversions API complements that pixel. Set up your banner first so consent is respected: see Configuring the cookie-consent banner.
Related
- Configuring the cookie-consent banner: gate the Meta Pixel behind visitor consent.
- Reading your site analytics: the built-in conversion goals and traffic data.