# Facebook Conversion API

With the Facebook Conversion API, you can easily send conversion data straight to Facebook. This helps you track how well your ads are doing and make them work better, all without needing third-party cookies.

{% hint style="info" %}
To use the Facebook Conversions API, you need: a **Dataset ID** and an **Access Token**.
{% endhint %}

### Get necessary data from Facebook business account&#x20;

#### Dataset ID

1. All Tools **»** Event Manager **»** Data sources
2. Connect Data Source **»** Define Data Source Name **»** Next&#x20;
3. Meta pixel and Conversion API (Recommended) **»** Next&#x20;
4. Select Events in Additional Events (as per requirement) **»** Continue&#x20;
5. Select Customer information parameters&#x20;
6. Review Setup **»** Finish&#x20;
7. Now click on Settings of created Data Source to copy Data Set ID

#### For Access Token

1. Scroll down on the same page **»** Move to Conversion API section
2. Go to **Generate Access Token** (under Set up direct integration) **»** Copy Access Token

<figure><img src="https://295230641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41f2EboJipeUA6flsLGK%2Fuploads%2F98rRI3ey333POt08nxt6%2Fimage.png?alt=media&#x26;token=0fe2505f-9771-4d19-a5d2-045520ca121b" alt=""><figcaption></figcaption></figure>

***

### Placement of dataset ID and an access token in Affiliate dashboard

1. Login to Affiliate dashboard **»** open respective Offer&#x20;
2. Go to Postback section

<figure><img src="https://295230641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41f2EboJipeUA6flsLGK%2Fuploads%2FkgTN8kOrBCnmetDuUd2f%2Fimage.png?alt=media&#x26;token=de260094-e4d8-458b-890d-ade3d29d3303" alt=""><figcaption></figcaption></figure>

3. Select Facebook in Type
4. Place **Dataset ID** and **Access token**&#x20;
5. Select Event&#x20;
6. Define Facebook Event
7. Facebook User data (Two values are mandatory to pass in Facebook User Data)

<figure><img src="https://295230641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41f2EboJipeUA6flsLGK%2Fuploads%2FWBq5ZzhM8tmPgVs2xQzl%2Fimage.png?alt=media&#x26;token=1e4c8c30-7b05-4a86-8b4b-fdf53fb2fbd9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

* For facebook Click ID use **{aff\_click\_id}**&#x20;
* For other values use additional parameters from **{aff\_sub1}** to **{aff\_sub5}**
  {% endhint %}

8. Go to Submit

{% hint style="info" %}
To use existing **Dataset ID** and **Access Token**, click on Use Existing then select Dataset ID from drop-down.
{% endhint %}

Make sure to use the same parameters in affiliate tracking link to receive the values from Facebook. The fbclid value will be tracked automatically, so aff\_click\_id is not required in the affiliate tracking link.
