This article describes how to set up the TikTok Pixel tag in your Tealium iQ Tag Management account.

The TikTok Pixel is a powerful measurement tool that tracks your TikTok ads impact on your website. This clever bit of code enables you to monitor sales, user activity, and find the right audience for your ads.

In this article:

Tag Tips

  • Use mappings to override or dynamically set the tag configurations.
  • You can use the Crypto Extension to encrypt and populate the Hashed Email and Phone Number values.
  • By default, the pixel base code always includes page view events, which track when a visitor lands on your website.
  • The content_type object property's value must be set to either "product", or "product_group".

Tag Configuration

First, go to the Tealium Tag Marketplace and add the TikTok Pixel tag (Learn more about how to add a tag).

After adding the tag, configure the following settings:

  • Pixel ID
    • Your TikTok Pixel ID.
    • The Pixel ID appears as a long series of numbers in the code snippet.
    • You may enter multiple Pixel IDs using a comma-separated list, without spaces.
    • Example: ttq("init", "12345678901234");
  • Generate Event ID
    • Automatically generate an Event ID for every TikTok tracking event.
    • This setting defaults to False.
    • Event ID attributes follow the naming convention: tiktok_event_id_<TikTok Event>
    • Example: tiktok_event_id_Purchase_32 : "028b2ade7478..."

Unique Event IDs

The tag can generate a unique Event ID for each event tracked and send it to Tealium EventStream for use in the TikTok Events connector. If you enable this feature, the Event ID parameter must be mapped in the connector to synchronize web-based and server-based integrations. This feature requires an active Tealium Collect tag.

The tag generates new event attributes using the following naming convention:

tiktok_event_id_<TikTok Event>_<Tag UID>

For example: tiktok_event_id_Purchase_32 : "028b2ade7478..." or tiktok_event_id_PageView_32

Data Mappings

Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see data mappings.

The available categories are:

Tag Configuration

Variable Description
Pixel ID (pixel_code) [String]
Automatic Pageview Tracking (auto_page_tracking) [Boolean]
Automatic Purchase Tracking (auto_purchase_tracking) [Boolean]

User Parameters

Variable Description
User Email (user_email) [String]
User Phone Number (user_phone_number) [String]
User Hashed Email (sha256_email) [String]
User Hashed Phone Number (sha256_phone_number) [String]

E-Commerce

Variable Description
Order ID (order_id) (Overrides _corder) [String]
Sub Total (order_subtotal) (Overrides _csubtotal) [String]
Currency (order_currency) (Overrides _ccurrency) [String]
Customer ID (customer_id) (Overrides _ccustid) [String]
List of Product IDs (product_id) (Overrides _cprod) [Array]
List of Categories (product_category) (Overrides _ccat) [Array]
List of Prices (product_unit_price) (Overrides _cprice) [Array]
List of Quantities (product_quantity) (Overrides _cquan) [Array]

Standard Tracking Parameters

Variable Description
Currency (currency) [String]
Content Category (content_category) [String,Array]
Content Name (content_name) [String,Array]
Content ID (content_id) [String]
Value (value) [Number]
Quantity (quantity) [Number]
Price (price) [Number]
Query (query) [String]
Contents (contents) [Array of objects]
Content Type (content_type) [String]

Events

Variable Description
AddPaymentInfo AddPaymentInfo
AddToCart AddToCart
AddToWishlist AddToWishlist
ClickButton ClickButton
CompletePayment CompletePayment
CompleteRegistration CompleteRegistration
Contact Contact
Download Download
InitiateCheckout InitiateCheckout
PlaceAnOrder PlaceAnOrder
Search Search
SubmitForm SubmitForm
Subscribe Subscribe
ViewContent ViewContent
Custom Custom
Public