# TikTok Conversions

The TikTok Conversions destination is a server-to-server integration with the TikTok Events API that allows advertisers to share website visitor events from Segment directly to TikTok.

Data shared through the Events API is processed similarly to information shared through the TikTok pixel and TikTok SDK business tools. Advertisers can use events data to power solutions like dynamic showcase ads (DSA), custom targeting, campaign optimization and attribution. Advertisers can see their event data in TikTok Events Manager.

TikTok maintains this integration. Please reach out to the \[TikTok support team]\(mailto: [segmenteng@bytedance.com](mailto:segmenteng@bytedance.com)) for any issues.

> \[!NOTE]
>
> Refer to the destination as Tiktok Conversions in the [Integrations object](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object).

## Benefits of TikTok Conversions

The TikTok Conversions destination provides the following benefits:

* **Clear mapping of data.** Actions-based destinations enable you to define the mapping between the data Segment receives from your source and the data Segment sends to TikTok.
* **Prebuilt mappings.** Mappings for TikTok Standard Events, like `PlaceAnOrder`, are prebuilt with the prescribed parameters and available for customization.
* **Streamlined stability and security.** Integrate and iterate without client-side limitations, like network connectivity or ad blocker issues.
* **Privacy-focused**: Stay compliant with rapidly evolving requirements with automatic PII hashing and flexible controls that let you adapt what data you share.
* **Maximum event measurement**: Capture more events with improved accuracy across different browsers, apps, and devices to get a unified view of your customer's journey from page view to purchase.

## Getting started

Follow the instructions below to enable your TikTok ads account and add the TikTok Conversions destination to your Segment workspace.

### Prerequisites

The TikTok Conversions destination is configured to use the TikTok Events API. To generate a TikTok Pixel Code and Access Token:

1. [Create a TikTok For Business account](https://business-api.tiktok.com/portal/docs?id=1738855099573250).
2. [Create a TikTok Pixel](https://ads.tiktok.com/help/article/get-started-pixel) in Developer Mode to obtain a Pixel Code. For more information about Developer Mode, please review the [TikTok developer documentation](https://business-api.tiktok.com/portal/docs?rid=5ipocbxyw8v\&id=1739585702922241).
3. Follow instructions for [Authorization](https://business-api.tiktok.com/portal/docs?id=1739584855420929) and generate a long term Access Token.

### Connect TikTok Conversions to your workspace

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for "TikTok Conversions" in the Destinations Catalog, and select the destination.
3. Click **Configure TikTok Conversions**.
4. Select the source that will send data to TikTok Conversions and follow the steps to name your destination.
5. On the Settings tab, enter in your TikTok Access Token and Pixel Code and click **Save**.
6. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/segment/connections/destinations/actions/#customize-mappings).

## Destination Settings

| Field        | Description                                                                                                                                                                                                                      | Required | Type     |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Access Token | Your TikTok Access Token. Please see TikTok’s \[Events API documentation]\(https://ads.tiktok.com/marketing\_api/docs?id=1701890979375106) for information on how to generate an access token via the TikTok Ads Manager or API. | Yes      | password |
| Pixel Code   | Your TikTok Pixel ID. Please see TikTok’s \[Events API documentation]\(https://ads.tiktok.com/marketing\_api/docs?id=1701890979375106) for information on how to find this value.                                                | Yes      | string   |

## Available Presets

TikTok Conversions has the following presets

| Preset Name           | Trigger                                   | Default Action   |
| --------------------- | ----------------------------------------- | ---------------- |
| Download              | Event event = "Download Link Clicked"     | Report Web Event |
| Add Payment Info      | Event event = "Payment Info Entered"      | Report Web Event |
| Contact               | Event event = "Callback Started"          | Report Web Event |
| Initiate Checkout     | Event event = "Checkout Started"          | Report Web Event |
| Complete Payment      | Event event = "Order Completed"           | Report Web Event |
| Click Button          | Event event = "Product Clicked"           | Report Web Event |
| Add to Wishlist       | Event event = "Product Added to Wishlist" | Report Web Event |
| Search                | Event event = "Products Searched"         | Report Web Event |
| View Content          | Event event = "Product Viewed"            | Report Web Event |
| Submit Form           | Event event = "Form Submitted"            | Report Web Event |
| Subscribe             | Event event = "Subscription Created"      | Report Web Event |
| Place an Order        | Event event = "Order Placed"              | Report Web Event |
| Page View             | Event type="page"                         | Report Web Event |
| Complete Registration | Event event = "Signed Up"                 | Report Web Event |
| Add to Cart           | Event event = "Product Added"             | Report Web Event |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following TikTok Conversions-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Report Web Event](#report-web-event)

### Report Web Event

Report Web events directly to TikTok. Data shared can power TikTok solutions like dynamic product ads, custom targeting, campaign optimization and attribution.

Report Web Event is a **Cloud** action.

| Field                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Required | Type    |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| Event Source              | The type of events you are uploading through TikTok Events API. Please see TikTok's \[Events API documentation]\(https://ads.tiktok.com/marketing\_api/docs?id=1701890979375106) for information on how to find this value. If no selection is made 'Web' is assumed.                                                                                                                                                                                                          | No       | STRING  |
| Additional Fields         | Include fields for travel or vehicle events.                                                                                                                                                                                                                                                                                                                                                                                                                                   | No       | STRING  |
| Event Name                | Conversion event name. Please refer to the "Supported Web Events" section on in TikTok’s \[Events API documentation]\(https://ads.tiktok.com/marketing\_api/docs?id=1701890979375106) for accepted event names.                                                                                                                                                                                                                                                                | Yes      | STRING  |
| Event ID                  | Any hashed ID that can identify a unique user/session.                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| Event Timestamp           | Timestamp that the event took place, in ISO 8601 format.                                                                                                                                                                                                                                                                                                                                                                                                                       | No       | STRING  |
| Phone Number              | A single phone number or array of phone numbers in E.164 standard format. Segment will hash this value before sending to TikTok. e.g. +14150000000. Segment will hash this value before sending to TikTok.                                                                                                                                                                                                                                                                     | No       | STRING  |
| Email                     | A single email address or an array of email addresses. Segment will hash this value before sending to TikTok.                                                                                                                                                                                                                                                                                                                                                                  | No       | STRING  |
| First Name                | The first name of the customer. The name should be in lowercase without any punctuation. Special characters are allowed.                                                                                                                                                                                                                                                                                                                                                       | No       | STRING  |
| Last Name                 | The last name of the customer. The name should be in lowercase without any punctuation. Special characters are allowed.                                                                                                                                                                                                                                                                                                                                                        | No       | STRING  |
| Address                   | The address of the customer.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | No       | OBJECT  |
| Order ID                  | Order ID of the transaction.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | No       | STRING  |
| Shop ID                   | Shop ID of the transaction.                                                                                                                                                                                                                                                                                                                                                                                                                                                    | No       | STRING  |
| External ID               | Uniquely identifies the user who triggered the conversion event. Segment will hash this value before sending to TikTok. TikTok Conversions Destination supports both string and string\[] types for sending external ID(s).                                                                                                                                                                                                                                                    | No       | STRING  |
| TikTok Click ID           | The value of the ttclid used to match website visitor events with TikTok ads. The ttclid is valid for 7 days. See \[Set up ttclid]\(https://ads.tiktok.com/marketing\_api/docs?rid=4eezrhr6lg4\&id=1681728034437121) for details.                                                                                                                                                                                                                                              | No       | STRING  |
| TikTok Cookie ID          | TikTok Cookie ID. If you also use Pixel SDK and have enabled cookies, Pixel SDK automatically saves a unique identifier in the \`\_ttp\` cookie. The value of \`\_ttp\` is used to match website visitor events with TikTok ads. You can extract the value of \`\_ttp\` and attach the value here. To learn more about the \`ttp\` parameter, refer to \[Events API 2.0 - Send TikTok Cookie]\(https://ads.tiktok.com/marketing\_api/docs?id=%201771100936446977) (\`\_ttp\`). | No       | STRING  |
| Locale                    | The BCP 47 language identifier. For reference, refer to the \[IETF BCP 47 standardized code]\(https://www.rfc-editor.org/rfc/bcp/bcp47.txt).                                                                                                                                                                                                                                                                                                                                   | No       | STRING  |
| Page URL                  | The page URL where the conversion event took place.                                                                                                                                                                                                                                                                                                                                                                                                                            | No       | STRING  |
| Page Referrer             | The page referrer.                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |
| IP Address                | IP address of the browser.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | No       | STRING  |
| User Agent                | User agent from the user’s device.                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |
| Contents                  | Related item details for the event.                                                                                                                                                                                                                                                                                                                                                                                                                                            | No       | OBJECT  |
| Content IDs               | Product IDs associated with the event, such as SKUs. Do not populate this field if the 'Contents' field is populated. This field accepts a single string value or an array of string values.                                                                                                                                                                                                                                                                                   | No       | STRING  |
| Number of Items           | Number of items when checkout was initiated. Used with the InitiateCheckout event.                                                                                                                                                                                                                                                                                                                                                                                             | No       | NUMBER  |
| Content Type              | Type of the product item. When the \`content\_id\` in the \`Contents\` field is specified as a \`sku\_id\`, set this field to \`product\`. When the \`content\_id\` in the \`Contents\` field is specified as an \`item\_group\_id\`, set this field to \`product\_group\`.                                                                                                                                                                                                    | No       | STRING  |
| Currency                  | Currency for the value specified as ISO 4217 code.                                                                                                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |
| Value                     | Value of the order or items sold.                                                                                                                                                                                                                                                                                                                                                                                                                                              | No       | NUMBER  |
| Description               | A string description of the web event.                                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| Query                     | The text string that was searched for.                                                                                                                                                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| Limited Data Use          | Use this field to flag an event for limited data processing. TikTok will recognize this parameter as a request for limited data processing, and will limit its processing activities accordingly if the event shared occurred in an eligible location. To learn more about the Limited Data Use feature, refer to \[Events API 2.0 - Limited Data Use]\(https://ads.tiktok.com/marketing\_api/docs?id=1771101204435970).                                                       | No       | BOOLEAN |
| Test Event Code           | Use this field to specify that events should be test events rather than actual traffic. You can find your Test Event Code in your TikTok Events Manager under the "Test Event" tab. You'll want to remove your Test Event Code when sending real traffic through this integration.                                                                                                                                                                                             | No       | STRING  |
| Delivery Category         | Category of the delivery.                                                                                                                                                                                                                                                                                                                                                                                                                                                      | No       | STRING  |
| Prediected Lifetime Value | Predicted lifetime value of a subscriber as defined by the advertiser and expressed as an exact value.                                                                                                                                                                                                                                                                                                                                                                         | No       | NUMBER  |
| Search String             | The text string entered by the user for the search. Optionally used with the Search event.                                                                                                                                                                                                                                                                                                                                                                                     | No       | STRING  |
| CRM Fields                | Fields related to CRM events.                                                                                                                                                                                                                                                                                                                                                                                                                                                  | No       | OBJECT  |
| Vehicle Fields            | Fields related to vehicle events.                                                                                                                                                                                                                                                                                                                                                                                                                                              | No       | OBJECT  |
| Travel Fields             | Fields related to travel events.                                                                                                                                                                                                                                                                                                                                                                                                                                               | No       | OBJECT  |

## FAQ & Troubleshooting

### Deduplication with the TikTok Pixel

If you independently placed the TikTok Pixel on your website, reach out to your TikTok representative to see if there are any necessary changes to your Pixel to properly deduplicate events sent through both the Pixel and the Segment TikTok Conversions destination.

### Match keys

To increase the probability of matching website visitor events with TikTok ads, send one or more of the following match keys and identifiers when possible:

* TikTok Click ID
* External ID
* Phone Number
* Email
* IP Address
* User Agent

### Other standard events

If you want to send a [TikTok standard event](https://ads.tiktok.com/marketing_api/docs?id=1701890979375106) that Segment doesn't have a prebuilt mapping for, you can use the [Report Web Event action](/docs/segment/connections/destinations/catalog/tiktok-conversions/#report-web-event) to send the standard event. For example, if you want to send a `CompleteRegistration` event:

1. Create a mapping for Report Web Event.
2. Set up your Event Trigger criteria for completed registrations.
3. Input a literal string of "CompleteRegistration" as the Event Name.

Please be aware that TikTok only supports [these event names](https://ads.tiktok.com/marketing_api/docs?id=1727541103358977).

### PII hashing

Segment creates a SHA-256 hash of the following fields before sending to TikTok:

* External ID
* Email
* Phone Number

### Web diagnostics

You can check whether the integration is working, test events in real-time, and troubleshoot common issues in TikTok's Web Diagnostics Suite. See the [TikTok Pixel Web Diagnostics documentation](https://ads.tiktok.com/help/article?aid=10000360) for more information.

## Support

The TikTok Conversions destination is owned and maintained by the TikTok team.

* For general Segment questions, including issues with event data not being sent to TikTok Events Manager, contact [Segment support](https://segment.com/help/).
* For questions regarding campaign setup and performance, web tracking, or additional API functionality, contact your TikTok representative.
