Why?
The Facebook Pixel is a convenient method to track users in your flow and use that data to optimize your ad campaigns. Problematically, since the Facebook Pixel lives in the browser, it's often blocked which reduces the quality of your analytics.
The Facebook Conversions API mitigates that problem by sending the same events through another route β an API.
In this guide, you learn how to set up the Facebook Conversions API with Heyflow to more reliably track your users' behavior.
Learn more about the FB Conversions API in this Facebook Business help article and in the Facebook Developers Documentation.
Step 1: Set up the Conversions API
Go to your Facebook business manager and navigate to the Events Manager. In the list of data sources, you should see your existing Pixels.
The Facebook Conversions API is designed to extend a Pixel's tracking. Click the Facebook 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 Facebook 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 Facebook events manager.
Save the integration.
If you haven't already, it's reasonable to also activate the Facebook Pixel integration in Heyflow where you simply insert the Pixel ID. We will automatically de-duplicate the events so events are only tracked once.
Step 3: Testing
Now, go back to your Pixel in the Facebook 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 Facebook 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 Facebook receives all events twice. However, Facebook 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 Facebook 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, 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 Facebook Standard Events, like Contact or ViewContent, Facebook will recognize it as such. If you name it anything else, it will get tracked as a Custom Event.