TikTok Pixel Tag Setup Guide
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.
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.
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 | Description |
---|---|
Pixel ID pixel_code |
String |
Content Type content_type |
String |
Automatic PageView Tracking auto_page_tracking |
Boolean |
Automatic Purchase Tracking auto_purchase_tracking |
Boolean |
Automatic Identity Tracking auto_identity_tracking |
Boolean |
User Parameters
Variable | Description |
---|---|
User Email email |
String |
User Phone Number phone_number |
String |
User Hashed Email sha256_email |
String |
User Hashed Phone Number sha256_phone_number |
String |
Standard Tracking Parameters
Variable | Description |
---|---|
Currency currency (Overrides _ccurrency ) |
String |
Value value (Overrides _ctotal ) |
Number |
Query query |
String |
Description description |
String |
Status status |
String |
Contents contents |
Array of objects |
Content ID content_id (Overrides _cprod ) |
Array of Strings |
Content Name content_name (Overrides _cprodname ) |
Array of Strings |
Content Category content_category (Overrides _ccat ) |
Array of Strings |
Quantity quantity (Overrides _cquan ) |
Array of Numbers |
Price price (Overrides _cprice ) |
Array of Numbers |
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: April 28, 2022