Skip to main content
Meta Conversions API (CAPI)

Use the Meta Conversions API (formerly Facebook) to reliably track activity in your heyflows.

Heyflow avatar
Written by Heyflow
Updated over a week ago

Intro

The Meta Pixel is a convenient method to track users in your flow and use that data to optimize your ad campaigns. Problematically, since the Meta Pixel lives in the browser, it's often blocked which reduces the quality of your analytics.

The Meta Conversions API mitigates that problem by sending the same events through another route – an API.

πŸ”Ž Learn more about the FB Conversions API in this Meta Business help article and in the Meta Developers Documentation.

In this guide, you learn how to set up the Meta Conversions API with Heyflow to more reliably track your users' behavior.


Step 1: Set up the Conversions API

Go to your Meta business manager and navigate to the Events Manager. In the list of data sources, you should see your existing Pixels.

❗ If you have not yet created a Meta pixel or data source, take a look here and create one, as it is essential for the Conversion API setup.

The Meta Conversions API is designed to extend a Pixel's tracking. Click the Meta Pixel you'd like to track and click on the Settings tab and scroll down to Conversions API.

Click On Generate access token. Copy the generated access token.

Step 2: Connect your heyflow

Now, go to your heyflow and navigate to Integrate > Analytics. In the list, click the Meta Conversions API and paste the copied access token into the Access Token field.

Also, copy and paste the ID of your pixel into the Pixel ID field. You can find your Pixel's ID at the very top of the Pixel Settings in the Meta events manager.

Click on connect to save the integration.

πŸ”Ž If you haven't already, it's reasonable to also activate the Meta Pixel integration in Heyflow where you simply insert the Pixel ID. We will automatically de-duplicate the events so events are only tracked once. This is not necessary for the Meta CAPI integration though.

Step 3: Testing

Now, go back to your Pixel in the Meta events manager and go to the Test events page. Here, copy the Test ID from the Test server events section. Insert this test ID in your heyflow's Meta Conversions API settings into the Test ID field.

Save the changes and publish your flow.

❗ The Test ID changes every few hours. When you return to testing, make sure to use the current test ID.

Now visit your recently published heyflow in another window or tab. On the Test events page, you should see a list of events, like this:

Here, we have set up both the Conversions API and the Pixel which is why Meta receives all events twice. However, Meta deduplicates events received multiple times, based on the Event ID.

In the list, you also see Received From, which can be either Browser (Pixel) or Server (Conversions API). Browser events are recorded almost instantly. Server events need a few seconds to come in.

Step 4: Set Live

Testing looks good? Awesome! To set the Meta Conversions API live, simply remove the Test ID from your integration settings, save the changes, and re-publish your heyflow.

Congrats, your heyflow's Conversions API is live πŸŽ‰


Bonus: Custom Event Tracking

PageViews are tracked automatically. But you can track a lot more events with Heyflow. To set up tracking for buttons, picture or multiple choice, go to the Build page of your heyflow, click on the block you want to track, and go to Tracking in the left sidebar. Activate Track button click and enter an event name below.

If you name your event one of the Meta Standard Events, like Contact or ViewContent, Meta will recognize it as such. If you name it anything else, it will get tracked as a Custom Event.

Did this answer your question?