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
-
Navigate to
Conversion APIpage fromSettings>Integration. -
Click on the
Add New APIbutton. -
You will be asked to enter
Pixel IdandAccess Token. You can find the pixel id from your ad account'sEvents Managerpage. ForAcces Tokenselect theSettingstab from Events Manager. From the settings tab, scroll down to see the Conversion API option. There you will see aGenerate access tokenlink. Click that link to generate your access token. -
Submit the form with your
Pixel IdandAccess Token. -
Conversion API is successfully integrated to your store.
eDokan only sends Purchase events to Conversion API.
Testing Conversion API.
-
Click on the pixel id from
Conversion APIpage in your eDokan manage panel. -
On the Pixel details page you will see a
Send Test Eventbutton along with a history of pixel events sent using Conversion API. -
Click on the 'Send Test Event
button. It will show you a popup and ask for aTest Code`. -
To get the test code, visit your ad accounts Event Manager. From there selet
Test Eventstab. -
Inside the
Test Eventstab, you will see a dropdown namedConfirm 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 -
Once you have got the test code, enter it on the popup and click send.
-
You will see the event with the test code and facebook's tracking id in the event history.
-
Go back to
Test Eventspage in your Facebook event manager. An event namedeDokanTestwill 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
| Name | Fields | Description |
|---|---|---|
| IP Address | client_ip_address | IP address of the customer. |
| Browser | client_user_agent | Customer's browser information. |
| Facebook Ids | fbp,fbc | Facebook Pixel's cookie and click id. |
| Customer Id | external_id | Customer's id in merchant's database. |
| Country | country | Default value is Bangladesh. |
user_data values sent from checkout form
These data will be sent if they are in the checkout form.
| Name | Fields | Description |
|---|---|---|
| Name | fn,ln | Customer first name and last name. |
| Phone | ph | Customer phone number. |
em | Customer email address. | |
| City | ct | City name. |
| District | st | District name. |
| Post Code | zp | Zip Code / Postal Code. |