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 un-hashed email or phone number) is populated. As per standard industry practice, TikTok will automatically hash 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 un-hashed email, the input text must contain an
@
symbol. The text must also end in a domain designation. - For TikTok to collect an un-hashed 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 base code will always include 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: The
content_type
sends TikTok information about the format of product IDs that are being sent through thecontent_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 base code will always include 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 will load. 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. |
Standard Tracking Parameters
Variable | Type | Description |
---|---|---|
currency (Overrides _ccurrency ) |
String | Currency. |
value (Overrides _ctotal ) |
Number | Value. |
query |
String | Query. |
description |
String | Description. |
status |
String | Status. |
contents |
Array of objects | Contents. |
content_id (Overrides _cprod ) |
Array of Strings | Content ID. |
content_name (Overrides _cprodname ) |
Array of Strings | Content name. |
content_category (Overrides _ccat ) |
Array of Strings | Content category. |
quantity (Overrides _cquan ) |
Array of Numbers | Quantity. |
price (Overrides _cprice ) |
Array of Numbers | Price. |
Events
To map events, refer to 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: March 5, 2025