Skip to main content

Meta Pixel integration setup

Updated today

The Meta Pixel integration sends key user events from your web app to Facebook's advertising system. Connect this integration to start measuring and optimizing your Facebook ad campaigns.

Pixel vs CAPI

The Meta Pixel is a snippet of JavaScript code from Facebook that runs in the browser and reports key events to Facebook Ads Manager. When you configure a Pixel ID in your Treefort dashboard, we automatically add this JavaScript code to your web app and begin reporting events on your behalf.

The Conversions API is a related tool from Facebook that can be used to report similar events from a server environment instead of from the browser. When you configure a Conversions API access token in your Treefort dashboard, our servers will automatically begin reporting key events to Facebook Ads Manager on your behalf.

Reporting events from both the browser with Pixel and the server with CAPI enhances Facebook’s ability to measure and optimize your ads.

Setup

  1. Follow Facebook’s instructions for creating a new Meta Pixel in the Meta Events Manager. Be sure to select “Conversions API and Meta Pixel” if you wish to setup CAPI.

  2. Copy your Pixel ID and Conversions API access token into the Meta Pixel integration card in your Treefort dashboard and press “Save”.

  3. Let us know when you’ve made this change - we’ll need to redeploy your web application for the change to take effect.

Events

We support some events for the Pixel only, some for the Conversions API only, and some for both. Facebook will automatically deduplicate events sent via both methods.

Event

Pixel

CAPI

Notes

StartTrial

Fired when a user subscribes with a free trial

Subscribe

Fired when a user subscribes without a free trial

CancelSubscription

Fired when a user cancels their subscription, even if they have time left on the subscription

RecurringSubscriptionPayments

Fired when a user’s subscription automatically renews

Purchase

Fired when a user subscribes with or without a free trial

InitiateCheckout

Fired when a user begins the checkout flow

CompleteRegistration

Fired when a user creates an account

Contact

Fired when a user submits the in-app contact form

Search

Fired when a user performs an in-app search

PageView

Fired when a user views any page in the app

ViewContent

Fired when a user views a content page in the app

Limitations

This integration is only supported on the web. Events from your Android and iOS apps will not be logged.

Did this answer your question?