You are on page 1of 10

Partner's Guide: Facebook API

conversion
How to configure your setup to track FB conversion
In order to send conversions from the ClickDealer platform to Facebook Event Manager via API, a new functionality
has been developed. It allows configuring all the necessary parameters transmittable from our platform.
The data setup via API includes the following steps:

• Preparation - setting up the application to receive access code for sending API requests.
• Adding data about the Facebook application to the new section in the affiliate portal
• Parameter configuration for sending them via API for campaigns and/or events.

1.Preparation: creating an application and obtaining the access


code
In order to successfully set up the integration, it is necessary to create an application on the Facebook side. This
application will generate the access token needed for sending API requests to create the events.

Step 1 - Create the application

• A new application must be created through the developer account: https://developers.facebook.com/apps/


• Specify the details of the application to be used for integration:

o App Type - Business


o App Purpose - Select from the following: Yourself or your own business.
o Business Manager account- specify the Facebook business account that will be used for integration in
the platform in the future.

• For further integration on the platform, you need to get additional information for the application. To do this
go to Settings - Basic.

Here is an example of the data you should get:

Application ID (App ID): 111100000001111


App Secret: dc83ba7abff08a1b663c6b036e8b9

Step 2 - Obtain an Access Token

1. Creating a new system user

• Go to https://business.facebook.com/settings and select the business manager that you used earlier
to create the application
• In the side menu, go to the Users tab - >System Users and click the Create button (the system user
configuration window will appear).
• Specify the user’s name and set the admin role

2
2. Obtaining a token:
• Select a previously created user from the list;
• Select the Add assets button - opens a pop-up window for parameter settings;
• In the Assets Type column select the App, for the Assets column select the previously created application
(in our case it is a ClickDealer app for testing) and in the last settings block select Manage App;
• After saving the changes, move on to generating the token. To do this we need to use the Generate new
token button
• In the opened Generate token pop-up, select our ClickDealer app for testing (or any other previously
created app) in the Available Permissions section, select the ads_read permissions
• After applying the changes in the Access token field the required code will be displayed.

Here is an example of the data you should get:


EAACY1j0789IQBAJlDIdDZAGB1ZCKgP8886ItTkztf9oamaJuoSd7jXLjst6ExExWUoTmA32bARWUZAVepmeMpNhJsQ
MXJVwJImLCeJW6jPAW1Jvf6Twan0PPzSQkjyBxNCZB855K02ZA7SgPw7jPfjjfdKA2AIeZCDNrAwZAsmgTNlv7m1roW
QVP

IMPORTANT!

The Facebook Business manager accounts that are selected for settings in step 1 and step 2 must be the same.

3
2.Adding Facebook BM to the affiliate portal
Once the application is created and the access token is generated, you can move on to the first
stage of filling in the data for further integration with Facebook and sending conversions via API
calls.
In the Tool - >Facebook Integration section two new tabs have been added. The first one is
for adding information about the application and the access token, the second one is for adding
general settings of data transfer via API, which later can be used for campaigns and/or events.

1.To start using the integration,


you need to add at least one record
to the Facebook business manager section.
You can add a new record via
Add Facebook Business Manager Account
section (displayed when clicking
on Add new account).

Facebook Business manager - the field


for entering the name of the account.
The name can be arbitrary and differ from the account’s name set on Facebook.

Access token - is the token obtained after configuration on Facebook (the code obtained after
the settings described in step 2).

4
App Id - the unique number of the application that has been created in the Facebook developer’s account.
The application number must be the same as the one used to generate the access code. This number can
be obtained by following the instructions described in step 1 (App ID paragraph).

App Key - secret code of the application that was used to generate the access code. This code can be
obtained by following the instructions described in step 1 (App Secret).

2. To check if the data is entered correctly, use the Configure button. If the data is entered correctly,
a success notification is displayed and the status in the Integration table changes to "Yes".

5
General API integration settings
To add general API integration settings that can be used for campaigns and/or events, go to Tool - Facebook
Integration - General FB settings

Field 1 - here you can select one of the Facebook business managers, whose data will be used when
submitting the FB events.

Field 2 - here you need to enter the Facebook pixel ID value to be sent for the events. You can enter a static
value or transfer a dynamic value.

For dynamic transfer, you need to select one of the platform macros and configure the pixel value transfer to this parameter into
the campaign link of the ClickDealer platform.

Field 3 - the Facebook event name setting is needed to select the event (the list consists of the standard FB
event names) which corresponds to the pixel specified above.

If an affiliate uses a non-standard event name, you’ll need to output its value by changing the state of the Use custom event
checkbox and entering the name.

Field 4 - The Action source field is required for indicating where exactly the conversions will be done. By
default, the system puts the value website, but this parameter can be different. More detailed information about
parameters for this field is described at: https://developers.facebook.com/docs/marketing-api/conversions-
api/parameters/serverevent#action-source

Field 5- The Event ID field is required to pass a unique parameter associated with each conversion.
Transmitted values will be used for parameter deduplication on Facebook.
Field 6 -The Event source URL setting transmits to the FB information about the page where the conversion
was made.

The default value is taken from the offer, but you can use your own link. For that purpose, define the setting as the Event source
URL = Value and enter the value.

6
IMPORTANT! The domain in the link you enter must be verified by Facebook.

Field 7 - The Facebook custom data setting is optional, but can be used to give additional parameters for
each conversion.

To add data, it is necessary to use the add row action: The Facebook field defines the name of the parameter which
will be received by the FB and displayed in your Event manager; the Value field is necessary for the parameter
definition (parameter in the ClickDealer system) to be passed to the particular Facebook parameter.

Use the Save all button to save the data in the block.

Field 8 - The Facebook user data setting is optional, but can be used to transmit additional parameters that
will provide additional traffic information.

The process of adding and saving parameters is similar to the one described in the Field 7

7
3.Setting up Facebook API integration:
3.1 Campaign

You can enable/disable the API integration setting for a campaign by clicking on the Facebook Integration button
in the campaign information view:

The parameters set is the same as General FB settings (Tool -


Facebook Integration - General FB settings).

As a result, a new Facebook integration setting was added,


which is always disabled for the first time you open it..

To send API calls to Facebook, change the state of the field


Facebook integration to Yes, and when conversions are made
within a campaign, data will be sent to Facebook.

3.2 Event
You can enable/disable the API integration settings for one / multiple events by clicking on the Facebook integration
link. After that a pop-up for data entry will open:

The parameters set is the same as General FB settings


(Tool – Facebook Integration - General FB settings).
As a result, a new Facebook integration setting was added,
which is always disabled for the first time you open it.

To send API calls to Facebook, change the state of the field


Facebook Integration to Yes, and when conversions are made
within a event, data will be sent to Facebook.

8
3.3 Smartlink campaign
You can enable / disable the API integration settings for Smartlink campaign after clicking on the Facebook
integration button in the campaign details section:

The parameters set is the same as General FB settings (Tool -


Facebook Integration - General FB settings).

As a result, a new Facebook integration setting was added,


which is always disabled for the first time you open it..

To send API calls to Facebook, change the state of the field


Facebook integration to Yes, and when conversions are made
within a campaign, data will be sent to Facebook.

9
You’re ready
to send traffic ;)

You might also like