Skip to main content

Conversion API

What is Conversion API?

Facebook's conversion api is a way to send additional event data to Facebook. This data is sent from merchant's server not the customer's browser.

How to setup Conversion API

  1. Navigate to Conversion API page from Settings > Integration.

  2. Click on the Add New API button.

  3. You will be asked to enter Pixel Id and Access Token. You can find the pixel id from your ad account's Events Managerpage. For Acces Token select the Settings tab from Events Manager. From the settings tab, scroll down to see the Conversion API option. There you will see a Generate access token link. Click that link to generate your access token.

  4. Submit the form with your Pixel Id and Access Token.

  5. Conversion API is successfully integrated to your store.

info

eDokan only sends Purchase events to Conversion API.

Testing Conversion API.

  1. Click on the pixel id from Conversion API page in your eDokan manage panel.

  2. On the Pixel details page you will see a Send Test Event button along with a history of pixel events sent using Conversion API.

  3. Click on the 'Send Test Eventbutton. It will show you a popup and ask for aTest Code`.

  4. To get the test code, visit your ad accounts Event Manager. From there selet Test Events tab.

  5. Inside the Test Events tab, you will see a dropdown named Confirm your server's events are set up correctly. Once you open that you will see the test code. Click on the copy button to copy it. Test code will be something like this - TEST12345

  6. Once you have got the test code, enter it on the popup and click send.

  7. You will see the event with the test code and facebook's tracking id in the event history.

  8. Go back to Test Events page in your Facebook event manager. An event named eDokanTest will appear there (it may take up to 2minutes to show).

Event Data

eDokan sends the following Purchase event data to Facebook Convserion API-

user_data values sent from system

These data will be always sent and does not depend on checkout fields

NameFieldsDescription
IP Addressclient_ip_addressIP address of the customer.
Browserclient_user_agentCustomer's browser information.
Facebook Idsfbp,fbcFacebook Pixel's cookie and click id.
Customer Idexternal_idCustomer's id in merchant's database.
CountrycountryDefault value is Bangladesh.

user_data values sent from checkout form

These data will be sent if they are in the checkout form.

NameFieldsDescription
Namefn,lnCustomer first name and last name.
PhonephCustomer phone number.
EmailemCustomer email address.
CityctCity name.
DistrictstDistrict name.
Post CodezpZip Code / Postal Code.