TikTok Pixel Tag Setup Guide
This article describes how to set up the TikTok Pixel tag in your Tealium iQ Tag Management account.
Tag tips
- Use data mappings to override and dynamically set the tag configurations.
- By default, the tag template detects if mapped product parameters contain single or multiple products per event. If a single product is detected, the individual TikTok product variables (
content_id
,content_category
,content_name
) are used. If multiple products are detected, thecontents
array is automatically populated and used. - By default, the
Identify
method is automatically sent for each event where user data (hashed or unhashed email or phone number) is populated. TikTok automatically hashes raw customer information with SHA256 before the value enters their servers for matching. Automatic hashing can be disabled in the tag configuration. - For TikTok to collect an unhashed email, the input text must contain an
@
symbol. The text must also end in a domain designation. - For TikTok to collect an unhashed phone number, the entered numeric values must follow the format
+{country code}{phone number}
. - You can use the Crypto Extension to encrypt and populate the Hashed Email and Phone Number values.
- The
value
parameter is automatically calculated and set in the template based on product prices and quantities. - By default, the pixel always includes page view events, which track when a visitor lands on your website. You can disable
auto_page_tracking
in the tag configuration or override it in the data mappings. - By default, the
CompletePayment
event occurs when an order ID is populated. You can disable thisauto_purchase_tracking
in the tag configuration or override it in the data mappings.
Tag configuration
Navigate to the Tag Marketplace to add a new tag. For more information, see About tags.
When adding the tag, configure the following settings:
- Content Type: Send TikTok information about the format of product IDs that are being sent through the
content_id
parameter. For example,content_type
=product_group
refers to general product groups or SPU values (often a prefix in the product ID), whilecontent_type
=product
is the full product ID for a single product (commonly referred to as the SKU). - Generate Event ID: Use with TikTok Events connector in Tealium EventStream API Hub. If enabled, the Event ID parameter must be mapped in the connector to synchronize web- and server-based integrations. This feature requires an active Tealium Collect tag.
- Auto PageView Tracking: By default, the pixel always includes page view events, which track when a visitor lands on your website.
- Auto Purchase Tracking: By default, the purchase tracking event occurs when an order ID is populated.
- Auto Identity Tracking: Referred to by TikTok as Advanced Matching. When true,
ttq.identify()
fires for every event where user data (email or phone number) is detected. - Limited Data Use: Limited Data Use (LDU) gives businesses more control over how event data is used in TikTok’s systems.
Load rules
Load the tag on all pages or set conditions for when your tag loads. For more information, see About load rules.
Data mappings
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For more information, see About data mappings.
The available categories are:
Tag Configuration
Variable | Type | Description |
---|---|---|
pixel_code |
String | Pixel ID. |
content_type |
String | Content type. |
auto_page_tracking |
Boolean | Automatic pageview tracking. |
auto_purchase_tracking |
Boolean | Automatic purchase tracking. |
auto_identity_tracking |
Boolean | Automatic identity tracking. |
ldu |
Boolean | Limited data use. |
User Parameters
Variable | Type | Description |
---|---|---|
email |
String | User email. |
phone_number |
String | User phone number. |
sha256_email |
String | User hashed email. |
sha256_phone_number |
String | User hashed phone number. |
external_id |
String | An identifier that represents a user on an advertiser’s platform, such as a customer ID, loyalty card number, or order ID. If provided in plain text, the TikTok library hashes the ID before ingestion. |
sha256_external_id |
String | A SHA256-hashed identifier that represents a user on an advertiser’s platform, such as a customer ID, loyalty card number, or order ID. Trim any leading or trailing spaces before hashing. |
Standard Tracking Parameters
Variable | Type | Description |
---|---|---|
currency |
String | Currency (Overrides _ccurrency ). |
value |
Number | Value (Overrides _ctotal ). |
query |
String | Query. |
description |
String | Description. |
status |
String | Status. |
contents |
Array of objects | Contents. |
content_id |
Array of Strings | Content ID (Overrides _cprod ). |
content_name |
Array of Strings | Content name (Overrides _cprodname ). |
content_category |
Array of Strings | Content Category (Overrides _ccat ). |
quantity |
Array of Numbers | Quantity (Overrides _cquan ). |
price |
Array of Numbers | Price (Overrides _cprice ). |
Events
For more information about mapping events, see Create an Event Mapping.
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 |
This page was last updated: April 1, 2025