TreyzaHelp Center
Integrations

Facebook Conversions API (CAPI)

In addition to the browser-side Facebook Pixel, it sends key events directly from your server to Facebook. This recovers data lost to ad blockers,…

Where to find it: Store management panel → IntegrationsFacebook Conversions API Who it's for: Stores that advertise on Facebook/Instagram and want to measure their conversions (purchase, add to cart, checkout) more completely. In short: In addition to the browser-side Facebook Pixel, it sends key events directly from your server to Facebook. This recovers data lost to ad blockers, cookie restrictions, and iOS privacy changes. When the same event arrives from both the browser and the server, Facebook deduplicates them (no double counting).

What does it do?

The classic Facebook Pixel runs only in the browser. Ad blockers, third-party cookie restrictions, and iOS privacy changes cause some of that data to never reach Facebook. The Conversions API (CAPI) sends events from your server instead — independent of the browser, so it's far more reliable.

Treyza sends these events from the server:

EventFacebook eventWhen
Product viewViewContentWhen a customer opens a product page
Add to cartAddToCartWhen a product is added to the cart
Begin checkoutInitiateCheckoutWhen the checkout step is reached
SearchSearchWhen a search is made in the store
PurchasePurchaseWhen an order is completed (the most important event)

PageView is sent by the browser Pixel; to avoid double counting it is not additionally sent from the server.

Why both Pixel and CAPI?

The best results come from using them together. When the same event goes through both channels, Facebook recognizes them as one event thanks to a shared event_id attached to each, and counts it once. This means neither data loss nor double counting.

  • Enable the Facebook Pixel integration (enter the Pixel ID) — the browser side.
  • Enable the Facebook Conversions API integration (same Pixel ID + Access Token) — the server side.

How to enable it

  1. Open the Integrations page and find Facebook Conversions API.
  2. Enter the following:
    • Pixel ID: The pixel ID in your ad account (digits only). It must be the same as the Facebook Pixel.
    • Access Token: The token created via Meta Events Manager → your data source (pixel) → Settings → Conversions API → Generate access token. This value is stored encrypted and is never sent to the storefront.
    • Test Event Code (optional): The code from the Test Events tab in Meta Events Manager. Use it only for setup verification; leave it empty when going live.
  3. Save and turn the integration on.
  4. Make sure the Facebook Pixel integration is also on and configured with the same Pixel ID.

Verifying the setup

  1. Open Meta Events Manager → your pixel → Test Events tab and enter the given Test Event Code into the integration.
  2. In your store, add a product to the cart, proceed to checkout, and complete a test order.
  3. In Test Events you should see the events arriving with a "Server" source.
  4. When the same event arrives from both the browser and the server, a "Deduplicated" label appears next to it — proof that dedup works.
  5. Remove the Test Event Code once verification is done.
  • Customer data (email, phone, name, address) is irreversibly hashed with SHA256 before being sent to Facebook. Raw personal data is never sent in plain text.
  • Browser events and the Pixel depend on the marketing consent in your store's cookie consent dialog: if the visitor doesn't accept marketing cookies, neither the browser nor the server sends these events.
  • If a registered customer has opted out of marketing communication, that customer's purchase event is not sent from the server.

FAQ

I already have a Pixel — is CAPI necessary? Not strictly, but strongly recommended. With Pixel alone, some conversions are lost to ad blockers and iOS; CAPI closes that gap.

Where do I get the Access Token? Meta Events Manager → your data source (pixel) → Settings → Conversions API → "Generate access token".

Will there be double counting? No. Browser and server events carry a shared event_id; Facebook counts them as one event.

Will my site slow down if something goes wrong? No. CAPI sending runs in the background with timeout protection; even if Facebook is unreachable, the checkout flow and pages are unaffected.

Was this page helpful?

On this page