Meta Pixel & Conversions API

Report your funnel events to Meta Events Manager, from the browser and from Purchasely's servers, to optimize Facebook and Instagram campaigns.

The Meta integration sends your funnel events to a dataset in Meta Events Manager. The Meta Pixel reports events from the visitor's browser; the Conversions API reports purchases again from Purchasely's servers, so a conversion is never lost to an ad blocker or an in-app browser. Both are configured from the same screen in the Console.

Purchasely eventMeta eventBrowserServer
Page ViewPageViewYes—
Screen ViewedViewContentYes—
Purchase TappedInitiateCheckoutYes—
PurchasePurchase, with value and currencyYesYes, when an access token is set

Browser and server copies of a purchase share the same event ID, so Meta deduplicates them and counts one conversion.

📘

One dataset, one ad account

Use a dedicated dataset for your Web2App funnels, connected to a single ad account. Sharing a pixel between several ad accounts, or sending browser and server events to different datasets, creates discrepancies in Events Manager.

1. Create a dataset and get the Pixel ID

Skip this step if you already have a pixel for your website: its Dataset ID is the Pixel ID.

  1. Open Meta Events Manager and click Connect data.
  1. Select Web and continue.

  1. Click Create new dataset, name it after your app and create it.
Meta Events Manager: create new dataset
Meta Events Manager: name the dataset
  1. Open the dataset, then its Settings tab, and copy the Dataset ID. This is your Pixel ID: a number, without letters.
Meta Events Manager: dataset settings with the Dataset ID

2. Enter the Pixel ID in the Console

  1. In Web2App → Setup, section 4. External integrations, open Meta Pixel.
  2. Enable the integration and paste the Dataset ID into Pixel ID.
  3. In the Front events tab, keep the four events enabled, or disable the ones you do not want to send.
  4. Save.
Purchasely Console: Meta Pixel integration with Pixel ID and Conversions API Access Token

Browser events start flowing to your dataset within minutes. Continue with the Conversions API to secure your purchase events.

3. Generate a Conversions API access token

You need to be an admin of the Meta business portfolio.

  1. In Events Manager, open your dataset. On the overview, click Set up Conversions API (or Start your setup in the Conversions API card).
Meta Events Manager: dataset overview, Set up Conversions API
Meta Events Manager: Conversions API, Start your setup
  1. Click See other ways to set up, select Set up manually and continue.
Meta Events Manager: choose your setup, Set up manually
  1. Select Conversions API and Meta pixel, then Start CAPI setup and Finish on the instructions screen.
Meta Events Manager: Conversions API and Meta pixel
Meta Events Manager: Conversions API instructions, Finish
  1. Under Manual implementation, tick Events sent using pixel code, add Purchase under Additional events, and continue through the parameters and review steps.
Meta Events Manager: events sent using pixel code
Meta Events Manager: additional events
  1. On the Using the Conversions API page, go to Generate an access token, choose Set up without Dataset Quality API, click Generate Access Token and copy the token.
Meta Events Manager: Using the Conversions API
Meta Events Manager: generate an access token

4. Enter the access token in the Console

Back in the Meta Pixel integration of the Console, paste the token into Conversions API Access Token and save. Purchases are now also sent from Purchasely's servers. The token is stored encrypted and never exposed to the browser.

5. Check that events arrive

  1. In Events Manager, open your dataset and go to the Test events tab.
Meta Events Manager: Test events tab
  1. Open the sandbox URL of a Web Flow, browse a few screens and complete a purchase with a Stripe test card. PageView, ViewContent, InitiateCheckout and Purchase appear in the tab.
  2. To confirm the Conversions API, click Manage integrations on the dataset overview: Conversions API shows Active or Waiting for first event. Once a purchase has been made, the Purchase event shows Multiple in the Integrations column, meaning it was received from both the browser and the server.
Meta Events Manager: manage integrations
Meta Events Manager: Conversions API and Meta pixel active

Sandbox purchases are real events for Meta. Use the Test events tab, or a dedicated test dataset, if you do not want them mixed with live traffic.

Troubleshooting

ProblemCause and solution
No event appears in Events Manager.The Pixel ID must be the numeric Dataset ID, and the integration must be enabled. Check the Front events tab too.
Events appear but Meta shows a domain warning.Add your funnel domain (web.purchasely.io or your subdomain) to the dataset's traffic permissions allow list in Events Manager.
Purchase is counted twice.Browser and server events reach different datasets, or the Pixel ID in the Console does not match the dataset of the token. Use the same dataset for both.
Purchases from in-app browsers are missing.Configure the Conversions API access token: server events do not depend on the browser.

What’s Next

Did this page help you?