TikTok

What Is TikTok?

TikTok for Business is a global platform designed to give brands and marketers the solutions to be creative storytellers and meaningfully engage with the TikTok community.

Streamline TikTok customer data streaming with MetaRouter's unified tracking tag. Easily route your website and mobile events to TikTok to create advertising audience segments, measure campaign performance, and attribute conversions to ads that your customers have viewed on TikTok.


Product Type: Advertising
Integration Type: Starter Kit & ID Sync
Event Source Type: Web, Mobile Browser, and Mobile App
Event Scope: Full-Funnel Events


Capabilities

  • This integration uses the TikTok Events 2.0 API as the main connector. Reporting App Events using Events API 2.0 is currently an allowlist-only feature. If you would like to access it, please contact your TikTok representative.
  • Starter-kit is default to web events. For event sources outside of web events, please check TikTok's API Reference to ensure all required and recommended parameters are included for the event source.
  • Captures key user interactions like page views, purchases, and sign-ups server-side, ensuring data accuracy.
  • Measures conversions (e.g., purchase) effectively using server-side data.
  • Maintains campaign attribution by sending necessary data (e.g., ttclid) through the API.
  • Creates custom audiences and retarget users based on server-side events.
  • This integration sends limited_data_use set to false by default. When set to true, TikTok applies restricted processing to the event, limiting its use for ad targeting, optimization, and audience creation. Advertisers should update this value as needed to align with regional privacy requirements or internal compliance policies.

Considerations

  • Additional app-only match identifiers — idfa (iOS IDFA), idfv (iOS IDFV), gaid (Google Advertising ID), and att_status (iOS App Tracking Transparency status) — can be added as Global or Event Specific mappings to improve match rates for app events. The locale (BCP 47 language tag) can also be added for web and app events.

Limitations

  • Behavioral Tracking: The range of tracked behaviors is less comprehensive compared to pixel tracking, which captures more granular user interactions.
    • The TikTok pixel can track user behaviors like page scroll depth, hover actions, and clicks on expandable product descriptions. Server-side tracking typically only captures high-level events like page views or form submissions.
  • Creative Interaction Data: Server-side tracking may lack the detail provided by the pixel regarding user engagement with ad creatives.
    • Pixel tracking can capture how long a user watches a video ad, whether they mute it, or if they click on a "Shop Now" button within the ad. Server-side tracking usually only registers whether the user clicked a link, missing these finer interaction details.
  • Audience Insights: Insights may be less detailed compared to those obtained through the pixel.
    • The pixel can provide detailed insights such as which ad elements users interacted with most or the specific paths they took on your website before converting. Server-side tracking may not capture the full sequence of these interactions.

Identity Sync

Sync Details

  • Captures the ttclid (TikTok Click ID) and ttp values used for conversion attribution and user matching.
  • Required by TikTok to attribute conversions to prior ad interactions.
  • Without this sync, conversions may not be accurately attributed in reporting.

Starter Kit Setup Guide

1. Deploy the TikTok Sync

  • To collect the sync values (e.g., ttclid, ttp), you must implement a TikTok ID sync. Refer to the following documentation to complete the setup: TikTok - ID Sync Guide.

2. Gather Credentials

  • Determine the Event Source for the event_source field:
    • web: Events on your website, measured by a Pixel Code (the default in the starter kit).
    • app: Events in your app, measured by a TikTok App ID.
    • offline: Conversions in a physical store, measured by an Offline Event Set ID.
    • crm: Lead events in a CRM system, measured by a CRM Event Set ID.
  • Acquire the following keys and IDs:
    • Access Token: Follow TikTok's documentation to obtain your access token.
    • Event Source ID: For web, specify a Pixel Code. For other event sources, specify the corresponding ID (Offline Event Set ID, TikTok App ID, or CRM Event Set ID).

3. Add a TikTok Integration

  • From the integration library, add a TikTok integration. Then, fill out the Connection Parameters:
Connection ParameterDescription
API_VERSIONDefault v1.3.
ACCESS_TOKENTikTok access token.
EVENT_SOURCEDefault web. See the credentials step for offline, app, or crm event sources.
EVENT_SOURCE_IDFor web event source, use your Pixel Code. For another event source, use the corresponding ID.

4. Configure Event Mapping

  • MetaRouter provides all of the event mappings that TikTok integrations typically require. You may add custom events, parameters, or mappings in accordance with TikTok's API documentation.

5. Deploy to Pipeline

  • In the Pipelines tab, add your TikTok integration.
  • Select the correct integration revision.
  • Click Add Integration to finalize deployment.

Event Mappings

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output KeyDescriptionExpected Input
partner_name RequiredString: Represents that the data is being sent by MetaRouter.Enrichment – 'Mr'
limited_data_useBoolean: Indicates limited data use status for the event.Enrichment – false
event_id RequiredString: A unique identifier for the event.Expression – hashes anonymousId and appends _ + messageId
event_time RequiredInteger: The timestamp of the event in seconds since UNIX epoch.Expression – converts timestamp or receivedAt to epoch seconds
page.urlString: The URL of the webpage where the event occurred.context.page.url
page.referrerString: The referrer URL that led to the event.context.page.referrer
user.ttclidString: TikTok Click ID, used to track the origin of the user.context.providers.tiktok.ttclid
user.ttpString: TikTok pixel ID for tracking user sessions across devices.context.providers.tiktok.ttp
user.external_idString: Advertiser-provided user identifier, hashed using SHA-256.Expression – SHA-256 hashes anonymousId
user.emailString: The user's email address, hashed using SHA-256.Expression – SHA-256 hashes trimmed, lowercased traits.email
user.phoneString: The user's phone number, hashed using SHA-256.Expression – SHA-256 hashes trimmed, lowercased traits.phone
user.ipString: The IP address of the user at the time of the event.context.ip
user.user_agentString: The user agent of the user at the time of the event.context.userAgent
user.localeString: User locale / language tag (BCP 47).context.locale

Event Specific

Page

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'ViewContent'
properties.descriptionString: A description of the event.Enrichment – 'page'
properties.contentsArray: Builds content with content_id (page path) and content_name (page title).Expression – builds from context.page

Products Searched

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'Search'
properties.search_stringString: The search query entered by the user.properties.query

Product List Viewed

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'ViewContent'
properties.descriptionString: A description of the product list viewed.Enrichment – 'product list viewed'
properties.content_typeString: The content type.Enrichment – 'product'
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: Total value of products viewed.Expression – total value of properties.products
properties.num_itemsInteger: Total item quantity across products.Expression – sums quantity across properties.products
properties.content_idsArray: Product identifiers (product_id or sku).Expression – maps product_id or sku across properties.products
properties.contentsArray: Builds product details per item with content_id, content_name, content_category, brand, price, and quantity.Expression – maps properties.products

Product Viewed

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'ViewContent'
properties.descriptionString: A description of the product viewed.Enrichment – 'product viewed'
properties.content_typeString: The content type.Enrichment – 'product'
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: The value of the product viewed.properties.price
properties.num_itemsInteger: Quantity for the viewed product.properties.quantity (default 1)
properties.content_idsArray: Product identifier list.Expression – builds from properties.product_id or sku
properties.contentsArray: Builds the viewed product detail with content_id, content_name, content_category, brand, price, and quantity.Expression – builds from properties

Product Added

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'AddToCart'
properties.content_typeString: The content type.Enrichment – 'product'
properties.descriptionString: A description of the product added.properties.name
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: The value of the product added to the cart.Expression – total value of properties
properties.num_itemsInteger: Quantity added.properties.quantity (default 1)
properties.content_idsArray: Product identifier list.Expression – builds from properties.product_id or sku
properties.contentsArray: Builds the added product detail with content_id, content_name, content_category, brand, price, and quantity.Expression – builds from properties

Product Added To Wishlist

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'AddToWishlist'
properties.content_typeString: The content type.Enrichment – 'product'
properties.descriptionString: A description of the product added to wishlist.properties.name
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: The value of the product added to wishlist.Expression – total value of properties
properties.num_itemsInteger: Quantity wishlisted.properties.quantity (default 1)
properties.content_idsArray: Product identifier list.Expression – builds from properties.product_id or sku
properties.contentsArray: Builds the wishlisted product detail with content_id, content_name, content_category, brand, price, and quantity.Expression – builds from properties

Cart Viewed

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'ViewContent'
properties.descriptionString: A description of the cart viewed.Enrichment – 'cart viewed'
properties.content_typeString: The content type.Enrichment – 'product'
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: The value of the products in the cart.Expression – total value of properties.products
properties.num_itemsInteger: Total item quantity across cart products.Expression – sums quantity across properties.products
properties.content_idsArray: Product identifiers (product_id or sku).Expression – maps product_id or sku across properties.products
properties.contentsArray: Builds product details per item with content_id, content_name, content_category, brand, price, and quantity.Expression – maps properties.products

Checkout Started

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'InitiateCheckout'
properties.content_typeString: The content type.Enrichment – 'product'
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: The value of products in checkout.Expression – total value of properties.products
properties.num_itemsInteger: Total item quantity across products.Expression – sums quantity across properties.products
properties.content_idsArray: Product identifiers (product_id or sku).Expression – maps product_id or sku across properties.products
properties.contentsArray: Builds product details per item with content_id, content_name, content_category, brand, price, and quantity.Expression – maps properties.products

Payment Info Entered

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'AddPaymentInfo'
properties.order_idString: The order ID associated with payment info.properties.order_id
properties.descriptionString: The payment method description.properties.payment_method

Order Completed

Output KeyDescriptionExpected Input
event RequiredString: The type of event.Enrichment – 'Purchase'
properties.content_typeString: The content type.Enrichment – 'product'
properties.order_idString: The ID of the completed order.properties.order_id
properties.currencyString: The currency of the transaction.properties.currency (uppercased, default USD)
properties.valueInteger: The value of the completed order.Expression – total value of properties.products
properties.num_itemsInteger: Total item quantity across products.Expression – sums quantity across properties.products
properties.content_idsArray: Product identifiers (product_id or sku).Expression – maps product_id or sku across properties.products
properties.contentsArray: Builds product details per item with content_id, content_name, content_category, brand, price, and quantity.Expression – maps properties.products

Required & Recommended Identifiers

These identifiers must be mapped to TikTok in order for successful user matching to occur. Without these IDs, any events sent to TikTok may not be accurately reflected in reporting. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

AttributeExampleSync Injector Required?
event_id Required80fba0ae1c48e3978e43e4efc365e14e12ea0c830ba8ba5b9a2dafc7e3f2ab8bNo
ttclid Highly Recommended1223123132123Yes
ttp RecommendedQRNtGPTKx_AiGeQv8-Ux6WD6s7yYes
external_id Recommended80fba0ae1c48e3978e43e4efc365e14e12ea0c830ba8ba5b9a2dafc7e3f2ab8bNo
ip Recommended203.0.113.1No
user_agent RecommendedMozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38No
email Recommended848a771458438fc2ec420560d769fb9b9b86851ee338ec56517baabd79d3bb4fNo
phone Recommended9f7ec22d72092cd3c0b58726ed9c2d91b92e51a3f29837508fb2948bb22dd2fdNo

Integration Validation

Coordinate with your TikTok representative, or use the TikTok Events Manager dashboard, to confirm that events are being received and processed correctly on their backend.


Additional TikTok Documentation