# How to Integrate TikTok Pixel & Events API with TagFly

## Before You Begin

If you’re new to TikTok Pixel setup, refer to this guide:

{% content-ref url="/pages/YbvRalbAlnmsdUgjp721" %}
[Get Your TikTok Pixel Ready](/tiktok/get-your-tiktok-pixel-ready.md)
{% endcontent-ref %}

## How to link your TikTok Pixel to TagFly

### Step 1: Navigate to TikTok Events Manager

* Login in your [TikTok Ads Manager](https://ads.tiktok.com/)
* In the navigation menu, select **Tools** and then choose **Events**.

<figure><img src="/files/lWVbqUUeRmyeLmMmZpNg" alt=""><figcaption></figcaption></figure>

### Step 2: Select Your Pixel

* Locate the **data source** section and choose the pixel you want to use for tracking

<figure><img src="/files/HYOdeb9IrGvJ6rokdA44" alt=""><figcaption></figcaption></figure>

* Find and copy the Pixel ID as shown below (e.g., CRLS0P3C77UDDAORF8JG).

<figure><img src="/files/b2O9YbyU6b2BBV0EzcHU" alt=""><figcaption></figcaption></figure>

### Step 3: Pass the copied ID to the TagFly app

<figure><img src="/files/lJOmmYcw2AjMCRV6623S" alt=""><figcaption></figcaption></figure>

## How to link your Tiktok Events API to TagFly

Using the Events API will help improve your tracking accuracy through server-side tracking, even when client-side tracking is limited by ad blockers or iOS 14 cookie restrictions.

### Step 1: Go to Settings tab of your pixel

<figure><img src="/files/msG9BCIY9bpm5fjH39U7" alt=""><figcaption></figcaption></figure>

### Step 2: Generate Access Token

* Scroll down to the bottom. At the Events API section, click Generate Access Token

<figure><img src="/files/hyGDsMvXAkMH6m2ylduh" alt=""><figcaption></figcaption></figure>

### Step 3: Pass the token to the TagFly app

* Once generated, click the token to copy it and paste the copied token to the app

<figure><img src="/files/va9zHnCwr1nlOoUbaNAe" alt=""><figcaption></figcaption></figure>

## **Next steps**

That’s it! You’ve successfully linked your TikTok Pixel and Events API Token to TagFly. Ensure you complete all required steps in the app to enable accurate TikTok tracking.

To verify everything is working properly, we recommend testing your events using the next guide.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tagfly.io/tiktok/how-to-integrate-tiktok-pixel-and-events-api-with-tagfly.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
