# How to Integrate Facebook Pixel and Conversion API to TagFly

## Before You Begin

If you’re new to Facebook Pixel setup, you might find this guide helpful:

{% content-ref url="how-to-set-up-your-facebook-pixel-now-is-dataset-id" %}
[how-to-set-up-your-facebook-pixel-now-is-dataset-id](https://docs.tagfly.io/facebook/how-to-set-up-your-facebook-pixel-now-is-dataset-id)
{% endcontent-ref %}

## How to link your Facebook Dataset ID to TagFly

* Access [Facebook Events Managers](https://business.facebook.com/events_manager2). In the left navigation panel, select **Data Source** > choose the Dataset you want to track with TagFly

<figure><img src="https://1144253429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MBfYCwydxsHKqFQVY7j%2Fuploads%2FDcOGLTWWgskZAPBL3WHU%2Fimage%20(6).png?alt=media&#x26;token=fbce029f-a229-48d2-b777-785a40cdf247" alt=""><figcaption></figcaption></figure>

* Go to the **Settings** tab, locate your Dataset ID. If you see a Pixel ID instead, that's fine too—they're both compatible. **Click the ID to copy it**

<figure><img src="https://1144253429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MBfYCwydxsHKqFQVY7j%2Fuploads%2Fn05zcxA0A9Fmr6V95f61%2Fimage%20(7).png?alt=media&#x26;token=83f4553b-ec24-46e4-a327-2cc58ce67b33" alt=""><figcaption></figcaption></figure>

* Pass the copied Dataset ID to the TagFly app.

<figure><img src="https://1144253429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MBfYCwydxsHKqFQVY7j%2Fuploads%2F0v4HlPG5V8hXs3956KlF%2Fimage%20(8).png?alt=media&#x26;token=47c13908-7170-44ed-9df0-f11987bce7c2" alt=""><figcaption></figcaption></figure>

## How to link your Facebook Conversion API Token to TagFly

Using the Conversion API ensures accurate server-side tracking, even when browser-based tracking is limited by privacy updates.

* In the **Settings** tab of your pixel, scroll down to the **Conversion API** section > click **Generate Access Token.**

<figure><img src="https://1144253429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MBfYCwydxsHKqFQVY7j%2Fuploads%2Fsk6B7b020xXhAATg49to%2Fimage%20(9).png?alt=media&#x26;token=f1ab0495-a120-4a3f-8ad5-b284060a1006" alt=""><figcaption></figcaption></figure>

* Once generated, click the token to copy it.

<figure><img src="https://1144253429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MBfYCwydxsHKqFQVY7j%2Fuploads%2FLE47dUkQDPvndDMRyfiQ%2Fimage%20(10).png?alt=media&#x26;token=6fa57430-aec9-4c30-98ab-0457dedc4a7f" alt=""><figcaption></figcaption></figure>

* Pass the copied access token to the TagFly app

<figure><img src="https://1144253429-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6MBfYCwydxsHKqFQVY7j%2Fuploads%2Fxi7FXsbQESY1SNutR1j8%2Fimage%20(11).png?alt=media&#x26;token=ebb60924-e30d-4ef2-a5cd-586c4395d599" alt=""><figcaption></figcaption></figure>

## Next steps

That’s it! You’ve successfully linked your Facebook Dataset ID and Conversion API Token to TagFly. Make sure to complete all the required steps in the app to enable Facebook tracking.

To verify everything is working correctly, we recommend testing your events using this guide:

[How to test whether your pixel installation is set up correctly](https://docs.tagfly.io/facebook/how-to-test-whether-your-pixel-installation-is-set-up-correctly)
