Tiktok Sync

What is TikTok?

TikTok is a social media platform that allows users to create and share short-form video content. It offers powerful advertising tools for marketers to engage with users and track conversions. TikTok's advertising solutions include a pixel-based tracking system and URL parameter-based attribution to help brands measure performance and target audiences effectively.

Product Type: Advertising

Integration Type: Starter Kit & ID Sync


Capabilities

  • Captures ttclid from URLs and stores it for tracking conversions.
  • Sets the ttp identifier via a tagless pixel integration that drops TikTok’s library and a first-party cookie.
  • Enhances server-side events with TikTok identifiers for audience targeting and attribution.
  • Updates stored identifiers whenever new matching values are detected.
  • Drops the TikTok pixel script, which sets the _ttp cookie for session tracking.

Considerations

  • The sync requires configuration of a Pixel ID and a Cookie Lifetime value in the MetaRouter UI.
  • The _ttp cookie is dropped via the loaded pixel script, allowing TikTok to recognize the user on future requests.

Sync Details

  • IDs:

    • ttclid – A unique identifier passed in TikTok ad URLs to track conversions and user sessions.
    • ttp – A 27-character unique identifier generated and stored in a first-party cookie to help TikTok recognize users.
  • Description:

    • The sync captures ttclid from URL parameters and ttp from a pixel library request.
    • Each value is stored in first-party storage for a configured duration.
    • Values are refreshed when new data is detected.
    • The identifiers are added to server-side event payloads for attribution or targeting.
  • Server-side Event Payload:
    Upon completion of all vendor's sync, the server-side events will incorporate all resolved identifiers as described above. The following object will be appended to the context.providers property within the event's JSON payload.

    {
      "tikTok": {
        "ttclid": "value from url parameter ttclid",
        "ttp": "random 27 charecter string"
      }
    }
    
    
  • Cookie Name:

    • Cookie: _meta_tiktok_ttclid
    • IndexedDB: [your storage prefix]_tiktok_ttclid
    • For a general guide on ID Sync validation, see here.

Sync Setup Guide

1. Gather Credentials

To complete this sync, you must obtain your TikTok Pixel ID from your TikTok Ads Manager account. If you are unsure where to find this, please consult TikTok’s documentation or reach out to their support team.

2. Add a TikTok Sync in MetaRouter

To gather the ttclid and ttp values, you must add a TikTok sync.

  1. From the Pipelines page, find the pipeline associated with the web property you’d like to add a sync to. Hover over the three dot dropdown and select “Build AJS File.”
  2. In the Identity Syncs section, select the TikTok sync.
  3. Fill out the following fields:
    1. Cookie Lifetime (in days) – Enter how long (in days) to store captured values. Example: 30
    2. Pixel ID – Enter your TikTok Pixel ID. Example: "CRQ2CU3C72U5KN4TDM20"
  4. Scroll down and click the Save and Build File button.
  5. Deploy your AJS file to propagate changes to your web property.