> ## Documentation Index
> Fetch the complete documentation index at: https://funnelfox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to set up TikTok Pixel

> Step-by-step guide to adding TikTok Pixel to your FunnelFox project. Configure event tracking and conversion optimization.

The [TikTok Pixel integration](/docs/integrations/tracking/tiktok-pixel) sends events like `CompletePayment` and `CompleteRegistration` to TikTok Events Manager, helping you optimize your ads on TikTok.

Events API also sends events directly from FunnelFox servers to TikTok, which bypasses browser limitations. This guide walks you through the complete setup process.

<Info>
  We strongly recommend using Events API. If you're unsure whether you need it, read our guide on
  [why use Events API](/docs/integrations/tracking/tiktok-pixel#use-events-api).
</Info>

## Setup

Follow these steps to create a TikTok dataset, get your Pixel ID, and connect it to FunnelFox.

### 1. Connect data source

1. Go to [TikTok Events Manager](https://ads.tiktok.com/i18n/events_manager/home) for your TikTok Advertiser account.

2. Click **Connect data source**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/pmYlKN9dZh_LBKH0/assets/connnect-data-source.png?fit=max&auto=format&n=pmYlKN9dZh_LBKH0&q=85&s=10a881c297f02a9c1729e588dc98e558" width="1719" height="806" data-path="assets/connnect-data-source.png" />
</Frame>

3. Select **Web** and click **Next**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/select-web.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=21f9acbdde38ed3bbb19f7611dba1e1b" width="1920" height="879" data-path="assets/select-web.png" />
</Frame>

4. Click **Skip** for adding the website URL.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/skip.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=8bf02809e0fc137bd5f84cc413b66f12" width="1920" height="879" data-path="assets/skip.png" />
</Frame>

5. Select **Manual setup** and click **Next**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/AXFzHTNSdei-sPeb/assets/manual-setup.png?fit=max&auto=format&n=AXFzHTNSdei-sPeb&q=85&s=d0e335b7ae676bdae72accabebc53f07" width="1920" height="879" data-path="assets/manual-setup.png" />
</Frame>

### 2. Create Pixel

1. Select **TikTok Pixel + Events API** and click **Next**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/pixel+events.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=00de212ed2096b907f29b0ae0572af17" width="1920" height="879" data-path="assets/pixel+events.png" />
</Frame>

2. Name your pixel and click **Create**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/AXFzHTNSdei-sPeb/assets/name-pixel.png?fit=max&auto=format&n=AXFzHTNSdei-sPeb&q=85&s=cb06a94972668ae9cffc94c7509319d5" width="1920" height="879" data-path="assets/name-pixel.png" />
</Frame>

3. You don't need to install the base code since FunnelFox has already implemented it for all your funnels.

Click **Next** under **Install base code**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/AXFzHTNSdei-sPeb/assets/install-base-code.png?fit=max&auto=format&n=AXFzHTNSdei-sPeb&q=85&s=c0aa137d749835657c79a1db1a3e0e70" width="1920" height="879" data-path="assets/install-base-code.png" />
</Frame>

4. You don't need to edit anything under **Manage configurations**.

Keep the selection as is and click **Next**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/AXFzHTNSdei-sPeb/assets/manage-configurations.png?fit=max&auto=format&n=AXFzHTNSdei-sPeb&q=85&s=feae9e76c821b50a30ce09e9eecfbcea" width="1920" height="879" data-path="assets/manage-configurations.png" />
</Frame>

### 3. Set up events

1. Click **switch to custom code** under **Set up events**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/switch-custom.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=a8b0e8477184453288ffe1829120843e" width="1920" height="879" data-path="assets/switch-custom.png" />
</Frame>

2. Add **Initiate Checkout**, **Complete Registration**, and **Purchase** events, then click **Next**.

You don't need to edit **Event parameters** since they are predefined.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/select-events.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=89a34c4318ad4c616347dc6f1f55ef8c" width="1920" height="879" data-path="assets/select-events.png" />
</Frame>

3. You don't need to implement the event code since FunnelFox has already implemented it for all your funnels.

Click **Next** under **Implement event code**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/AXFzHTNSdei-sPeb/assets/event-code.png?fit=max&auto=format&n=AXFzHTNSdei-sPeb&q=85&s=3e752cedc27a2ed6d2c10f787a0ee1a3" width="1920" height="879" data-path="assets/event-code.png" />
</Frame>

4. You don't need to test the integration at this stage so click **Next** under **Testing**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/tiktok-testing.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=ff66ff78492b738fbfbdb72c3ac515cf" width="1920" height="879" data-path="assets/tiktok-testing.png" />
</Frame>

### 4. Generate token

1. Click **Generate access token** under **Implement Events API**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/tiktok-generate.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=648438a0457edf12d831df36bd69db84" width="1920" height="879" data-path="assets/tiktok-generate.png" />
</Frame>

2. Now you have both your Pixel ID and access token available.

Keep this page open since you'll need to copy and paste both values into FunnelFox.

<Frame>
  <img src="https://mintcdn.com/funnelfox/CjZSZoeJ5IMPC1DB/assets/token-pixelid.png?fit=max&auto=format&n=CjZSZoeJ5IMPC1DB&q=85&s=9fde182760864cfd2049a9aeb39948d5" width="1920" height="879" data-path="assets/token-pixelid.png" />
</Frame>

### 5. Apply Pixel ID & token

1. Go to [Integrations > TikTok](https://app.funnelfox.com/integrations/tiktok) in FunnelFox.
2. Paste your Pixel ID and token into **TikTok Pixel ID** and **TikTok Events API Key** fields.
3. Click **Save changes**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/QcqHOia_yy8h3Fi2/assets/tiktok-paste.png?fit=max&auto=format&n=QcqHOia_yy8h3Fi2&q=85&s=20f0e00c6d45104058e450fe1ae2f3b9" width="1920" height="879" data-path="assets/tiktok-paste.png" />
</Frame>

4. Go back to the TikTok setup page and click **Next**.
5. Click **Go to Test events** under **Testing**. You can click **Finish** after completing our [testing guide](/docs/integrations/tracking/set-up-tiktok-pixel#test-your-integration) below.

<Check>TikTok Pixel and Events API are now active! Republish your funnels to start tracking.</Check>

<Warning>TikTok will consider your setup incomplete and ask you to continue until you [test](/docs/integrations/tracking/set-up-tiktok-pixel#test-your-integration) the integration.</Warning>

<Frame>
  <img src="https://mintcdn.com/funnelfox/AXFzHTNSdei-sPeb/assets/finish-tiktok.png?fit=max&auto=format&n=AXFzHTNSdei-sPeb&q=85&s=ec1523c2d34d7a3363f27866b70a853d" width="1920" height="879" data-path="assets/finish-tiktok.png" />
</Frame>

## Test your integration

<Tip>If you accidentally closed the setup page before testing, go to the **Test events** tab of your Pixel (data source) to continue.</Tip>

Test that your event tracking works by sending test events from your funnel:

1. Paste your funnel URL and click **Open website** under the **Test events** tab.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/tiktok-paste-url.png?fit=max&auto=format&n=h7zRfisyT68NpzvX&q=85&s=6a8f7a5d7f71347dddd2d182483dad33" width="1920" height="879" data-path="assets/tiktok-paste-url.png" />
</Frame>

2. Interact with your funnel. Events will appear under **Test event activity**.

<Frame>
  <img src="https://mintcdn.com/funnelfox/h7zRfisyT68NpzvX/assets/tiktok-test-events.gif?s=e693b1d3ef8923b02a3cdd7f8d43aef6" width="1920" height="880" data-path="assets/tiktok-test-events.gif" />
</Frame>
