In this guide, we will discover how to set up data transfer to the Facebook Conversion API using server-side integrations in a matter of minutes.
How does it work?
Before we proceed to the setup, a few important things should be outlined.
Facebook Conversion API is a method of transmitting events to Facebook Pixel using the API. The more data you send to Facebook’s side the more likely Facebook will match them.
And in conclusion, briefly about the data schema.
In addition, each event can be supplemented with custom fields (we call them properties). For example, you can specify the email or name of your users.
That is, you can specify a unique set of properties for each individual event, which will later be available for transmission to Facebook CAPI.
Facebook input data
Facebook CAPI expects to receive incoming data according to its documentation. All of them are available for integration via Renta. Besides, you don’t have to worry about the data format — we automatically convert them to the API requirements.
For example, we cache users’ personal data or convert geodata to ISO format.
As a result, all incoming events that arrive on the server are transported in real-time to the Facebook Conversion API. The more data you transmit, the higher the probability of matching data on the Facebook side.
Implementation of the Conversion API
Here is a step-by-step guide to creating an integration.
Step 1: Specify the data source.
Next, you will be redirected to a page where you must specify the destination. In our example, this is the Facebook Conversion API.
Step 2: Specify the destination.
Log in with a Facebook account that has access to the PIxel you plan to transfer data to.
Select the account you added.
Step 3: Configuration settings.
This step is the main one. Its purpose is to specify the mapping fields for data synchronization between the first-party tracking and Facebook Conversion API, which provides full control over the data you share with a third party, which is especially important when observing GDPR.
Let’s go directly to the setup.
Specify any name.
It is displayed in the list of created integrations in the Renta interface.
Displays a list of available business manager accounts and advertising cabinets that Facebook Pixel is linked to.
Select the business manager that contains the desired Facebook Pixel.
Facebook Pixel Name
Specify the Facebook Pixels to which you want to transfer events.
This means that every time you view a page, the page event will trigger the activation of sending data to Facebook CAPI. The data that comes with the page event is available for transmission to the Facebook Conversion API.
Allow you to add additional filtering. For example, you need to send page view events only for the blog section. To do this, you can add a filter: page contains blog.
Facebook Pixel event name
Select a standard event type or specify a custom event name to be sent to Facebook CAPI.
Renta supports the transmission of both standard and custom events. In our example, we send the fact of viewing the blog page. Accordingly, it’s most logical to use the standard View Content event.
The action takes place on the site, so we keep the Website.
This is the most responsible step. Here we specify the configuration of how the page event data should be mapped to the fields that we pass to Facebook CAPI.
You can fully control what data will be transmitted to Facebook CAPI. We have prepared a recommended list of parameters for transmission below:
|eventId||Event ID||String||Do not hash|
|page||Event source URL||String||Do not hash|
|title||Content Name||String||Do not hash|
|fbc_cookie_id||Click ID||String||Do not hash|
|fbp_cookie_id||Browser ID||String||Do not hash|
|deviceIp||Client IP Address||String||Do not hash|
|deviceUserAgent||Client User Agent||String||Do not hash|
These parameters are enough to provide a data-matching score in Facebook Ads at the level of 7/10.
We also recommend transferring the email and phone fields for events that contain this information. This will bring the data matching score closer to the maximum values.
Responsible for debugging mode. To test the integration in test mode, copy the test event code from the Facebook Pixel interface and specify it in this field:
This will ensure that the event is passed to the Facebook API test environment. Disable this setting after the testing is complete. Then save the integration.
On this server-side, the Facebook Pixel implementation is complete, but let’s take another example.
Sending transactions to the Facebook Conversion API
Let’s analyze an example of a configuration for sending a transaction with the client’s personal data (in a hash, of course).
We will change only three blocks in this case:
This is a track-type event in my example, where eventName is TransactionCompleted.
Facebook Pixel event name
Purchase is a standard Facebook Pixel event that should be used to commit transactions.
I will add custom fields that come with the data of the selected event to the recommended parameters:
|Properties.first_name||First Name||String||Hashing required|
|Properties.last_name||Last Name||String||Hashing required|
Thus, you can create secure data flows based on server-side solutions. Renta’s infrastructure automatically converts data to the requirements of the Facebook Conversion API.
Against the background of tightening the policy regarding third-party cookies by such systems as Intelligent Tracking Prevention from Apple, the ability of Facebook Pixel to track data is decreasing. The Conversion API allows you to fill these gaps and provide better attribution of conversions.
Using Facebook CAPI increases the size of the user audience for retargeting and building look-a-like audiences.
Flexible data flow configuration settings allow you to respond to the requirements of Schrems II and GDPR.
Also do not hesitate to contact the customer success team if you need technical assistance when implementing the Conversion API.