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

# Configure the TikTok Conversion API

> Configure the TikTok Conversion API in Cometly to send your tracked leads and sales to TikTok, set default pixels and add rules for specific events.

The TikTok Conversion API is a server-to-server connection that sends the events Cometly tracks (your leads, sales and other conversions) back to TikTok. When you configure the TikTok Conversion API in Cometly, you choose which events are sent and which TikTok pixel (the ID TikTok files conversions under) receives them.

This matters because TikTok can only optimize and report on the conversions it knows about. Sending the conversions Cometly has tied to a TikTok ad click gives TikTok more complete data to work with, and routing each one to the pixel of the ad that drove it keeps your reporting in TikTok accurate per campaign.

## How it works and why it helps

Sending Cometly's conversion data back to the TikTok ads platform gives TikTok more complete data to report on and optimize with.

The video below comes from [Cometly 101: How it works](https://docs.cometly.com/getting-started/how-cometly-works.md).

[Feeding the ad platform's AI with accurate data](https://www.loom.com/embed/1b4fcb623b17409ba6a2547ec21330e1)

## Before you start

* Connect your TikTok ad account to the space (a space is a workspace inside your Cometly account, with its own data and integrations). See [Connect your ad platforms](https://docs.cometly.com/getting-started/connect-ad-platforms.md).
* Have your TikTok pixel ID to hand.
* Make sure your events are tracking accurately in Cometly. The Conversion API page recommends waiting at least 7 days after events start flowing before you turn data sharing on.

## Configure the TikTok Conversion API

1. In Cometly, click **Events Manager** in the sidebar, then open the **Conversion API** tab.

2. Click the **TikTok** row to expand it.

   ![Expanded TikTok row on the Conversion API tab showing Master Data Sharing Settings, the Configure default pixels table and the Save button, with an arrow pointing at the selected Send only attributed events option](https://mintcdn.com/cometly/BM7eSn6-ecx8ZzBx/images/guides/conversion-api/tiktok/01.webp?fit=max\&auto=format\&n=BM7eSn6-ecx8ZzBx\&q=85\&s=52edb7676257a5335a50a8e72306dda8)

3. Under **Master Data Sharing Settings**, select one of the options:

   * **Turn off data sharing**: no event data is sent to TikTok.
   * **Send only attributed events** (recommended): sends only events that Cometly can attribute to a TikTok ad click.
   * **Send all events**: sends all event data to TikTok, including unattributed events.

4. Under **Configure default pixels**, enter a pixel ID in the **Default pixel** column for each TikTok ad account. Cometly uses it when an event cannot be tied to a specific pixel.

5. In the **Default account** column, select **Use this account for unattributed events** on one account. This account receives events that are not attributed to a specific TikTok ad. A default account is required when you send all events, either as the master setting or in a custom rule.

   ![Configure default pixels table with arrow 1 on the pixel ID typed in the Default pixel column and arrow 2 on the selected Use this account for unattributed events option](https://mintcdn.com/cometly/BM7eSn6-ecx8ZzBx/images/guides/conversion-api/tiktok/02.webp?fit=max\&auto=format\&n=BM7eSn6-ecx8ZzBx\&q=85\&s=3b2b502522017d32ee01d4e8307dcc77)

6. Click **Save**.

By default, Cometly sends each attributed conversion to the TikTok pixel attached to the ad that drove it.

### Custom rules for specific events

The master setting applies to every event. To make one event behave differently, expand **Custom Rules for Specific Events**, click **Add custom rule**, select the event under **Cometly event**, and choose a **Rule**:

* **Do not send any events**: the event is never sent to TikTok.
* **Only send attributed events**: sends the event only when it is attributed to a TikTok ad.
* **Send all events**: sends every occurrence of the event, regardless of attribution.

Events without a rule follow the master setting. Click **Save** after you change your rules.

### Advanced: force all events to a single TikTok pixel

When the master setting is **Send all events**, an **Advanced** section appears with the option **Force all events to a single TikTok pixel**. Turning it on sends every conversion to the default account's pixel instead of the pixel attached to the ad.

> [!WARNING]
>
> Only turn this on if you have consolidated to a single pixel, or TikTok support or your agency told you to send everything to one pixel. Forcing events to the wrong pixel can break attribution in TikTok Ads Manager and is difficult to reverse.

## Check it worked

Open the **Conversion API** tab of **Events Manager** again. The **TikTok** row now shows an **Active** badge instead of **Inactive**. Conversions are sent about 15 minutes after Cometly records them, and once one has been sent successfully, the **Conversion API** check on the [Tracking Health](https://docs.cometly.com/getting-started/tracking-health.md) tab of Setup passes.

## Turn it off

To stop sending events to TikTok, select **Turn off data sharing** in the **TikTok** row and click **Save**.

## Frequently asked questions

### How long does it take for a Cometly conversion to show up in TikTok?

Cometly sends each conversion to TikTok about 15 minutes after it records it. How soon it then appears in TikTok's own reports is up to TikTok.

### Do I need a default pixel if I only send attributed events?

It is a good idea. An attributed conversion goes to the pixel attached to the ad that drove it, but if that ad has no pixel attached, Cometly uses the default pixel you entered for the ad's account. If there is no pixel on the ad and no default pixel for the account, the conversion is not sent to TikTok.

### Can I keep a single conversion out of TikTok, for example when a visitor opts out?

Yes. You can flag an individual event so Cometly keeps it for attribution and reporting but does not send it through the Conversion API. The flag applies to every ad platform, not only TikTok. See [Exclude an event](https://docs.cometly.com/guides/conversion-api/exclude-an-event.md).

## Next steps

* [Exclude an event from the Conversion API](https://docs.cometly.com/guides/conversion-api/exclude-an-event.md)
* [Check the Conversion API in Tracking Health](https://docs.cometly.com/getting-started/tracking-health.md)
* [Set up the Conversion API for another ad platform](https://docs.cometly.com/guides/conversion-api/overview.md)
* [Connect TikTok Ads to Cometly](https://docs.cometly.com/integrations/ad-platforms/tiktok.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.