TikTok

TikTok

TikTok Pixel is the conversion tracking and audience management tool for advertisers running campaigns on TikTok. Scripts fire on advertiser websites to capture standard events like page views, add-to-cart, and purchases. The data drives campaign optimization, lookalike audience creation, and attribution reporting in TikTok Ads Manager.

Overview

TikTok Pixel is the conversion tracking and audience management tool for advertisers running campaigns on TikTok's advertising platform. Operated by ByteDance, TikTok's parent company, the pixel fires on advertiser websites to capture standard e-commerce and lead generation events. The data powers campaign optimization through TikTok's machine learning-based delivery system, enables lookalike and retargeting audience creation, and feeds attribution reporting in TikTok Ads Manager. TikTok is the second-largest short-form video platform globally, making its ad pixel one of the more widely deployed marketing scripts on retail and consumer-facing websites.

What This Script Does

Script Files and Domains

The main pixel script loads from analytics.tiktok.com/i18n/pixel/events.js. Outbound data requests are made to analytics.tiktok.com and business-api.tiktok.com. The script is typically initialized via a base code snippet injected into <head> and then event-specific calls fire on user interactions.

Cookies Set

  • _ttp — TikTok's primary cross-site tracking cookie. Persistent, 13-month expiry. Third-party cookie that persists the visitor's unique identifier used for attribution and audience building.
  • _tt_enable_cookie — Boolean flag storing the user's cookie consent choice within TikTok's own interface.
  • tt_sessionId — Session-scoped identifier for grouping events within a single browsing session.

Standard Events Captured

The pixel captures: PageView (fires on every page), ViewContent (product detail pages), AddToCart, InitiateCheckout, AddPaymentInfo, Purchase (with order value, currency, content IDs), CompleteRegistration, Lead, Search, and Contact. Each event payload includes the event name, timestamp, page URL, referrer, and user agent.

Advanced Matching

When enabled, the pixel transmits hashed (SHA-256) user identifiers — email address, phone number, and external user ID — alongside event data. This improves attribution accuracy by matching site visitors to TikTok accounts even when cookies are unavailable (e.g., cross-device scenarios). Hashing is client-side before transmission.

Pixel + Events API (Server-Side)

Many TikTok advertisers implement both the browser pixel and the TikTok Events API (server-to-server). The browser pixel handles real-time event capture while the server-side API closes attribution gaps caused by ad blockers and browser privacy features.

Audience Building

Visitor data feeds into Custom Audiences (retargeting) and Lookalike Audiences. TikTok's algorithm uses behavioral patterns from pixel events to find high-intent users similar to converters.

Consent & Compliance

Category: Marketing

TikTok participates in IAB TCF 2.2 as a registered vendor. Relevant purposes exercised include Purpose 1 (Store/access information on device), Purpose 3 (Create personalised ads profile), Purpose 4 (Select personalised ads), and Purpose 7 (Measure ad performance). Special Feature 1 (precise geolocation) is also declared.

Under GDPR, the TikTok Pixel requires explicit opt-in consent. It sets persistent third-party cookies, transmits behavioral data to ByteDance's servers, and involves international data transfers to servers in the US and Singapore. The Irish DPC opened an inquiry into TikTok's data transfer practices in 2023. TikTok is listed under the EU-US Data Privacy Framework (DPF) for US transfers.

Under CCPA/CPRA, behavioral data shared with TikTok for advertising optimization constitutes "sharing" of personal information for cross-context behavioral advertising. The "Do Not Sell or Share" opt-out must be honored before firing the pixel for California residents.

ePrivacy: The _ttp cookie is not strictly necessary and requires prior consent.

Should You Block This Without Consent?

Yes. The TikTok Pixel sets persistent tracking cookies, transmits behavioral data to ByteDance servers internationally, and performs audience profiling for advertising. It provides no site functionality for the end user. Block until explicit marketing consent is obtained.

Is TikTok GDPR compliant?

TikTok typically loads marketing trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So TikTok can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads TikTok, not on TikTok itself.

Visit website

Products (3)

Consent Categories

Also Known As

TikTok PixelTikTok trackingTikTok Ads Manager pixelByteDance trackingTikTok GDPRTikTok conversion pixelTikTok cookie

Industries

Arts and Entertainment

Tracked Domains (3)

analytics.tiktok.comMarketing

analytics.tiktok.com is a marketing domain operated by TikTok, used to serve ads, build audiences, and measure ad conversions.

tiktok.comMarketing

tiktok.com is a marketing domain operated by TikTok, used to serve ads, build audiences, and measure ad conversions.

www.tiktok.comMarketing

www.tiktok.com is a marketing domain operated by TikTok, used to serve ads, build audiences, and measure ad conversions.

Cookies TikTok Sets (5)

_ttp

TikTok Pixel browser identifier set on the customer apex for ad attribution and event deduplication. 13-month expiration.

ttcsid

TikTok Pixel client session identifier. Matches on-site events to TikTok advertising campaigns for conversion attribution and ad optimization. Sibling per-pixel cookies use the ttcsid_<pixel-id> prefix.

ttcsid_

TikTok Pixel per-pixel client session identifier. The suffix encodes the specific pixel ID so a page running multiple TikTok pixels stores a distinct session per pixel for attribution.

_ttclid

TikTok Pixel click ID storing the ttclid query parameter for last-click attribution. 30-day expiration.

_tt_enable_cookie

TikTok Pixel first-party cookie toggle. Indicates whether the publisher has opted in to TikTok Pixel first-party cookies on this domain; presence enables per-visitor recognition for conversion attribution.

Frequently Asked Questions

Related Vendors

Flowplayer
Flowplayer
Open-source HTML5 video player and streaming platform used by media sites and publishers. The Flowplayer script loads an embeddable video player with live and on-demand streaming support. Minimal tracking; analytics depend on the publisher's configuration.
TikTok Ads
TikTok Ads
TikTok Ads tracking scripts supplement the TikTok Pixel to enable campaign targeting and attribution on TikTok's advertising platform. Scripts set cookies and collect behavioral signals to match website visitors to TikTok user profiles for audience segmentation and ad measurement.
Facebook Share Button
Facebook Share Button
Facebook Share Button is a Meta social plugin that lets visitors share web content to their Facebook feed. Scripts load the Meta SDK and set cross-site tracking cookies on page load, enabling Meta to track visits and attribute browsing behavior for advertising purposes.
Facebook Like Button
Facebook Like Button
Facebook Like Button is a Meta social plugin that embeds a like and react button on external websites. Scripts load the Meta SDK and set Facebook tracking cookies on page load regardless of visitor interaction. Browsing data may be shared with Meta for ad targeting purposes.
TikTok Events API
TikTok Events API
TikTok Events API enables server-to-server sharing of conversion events with TikTok's advertising platform. Rather than relying solely on browser scripts, event data such as purchases and signups is sent directly from the website server to TikTok, improving signal quality for ad attribution.
ConvertFlow
ConvertFlow
ConvertFlow is an on-site conversion optimization platform for building CTAs, quizzes, forms, and personalized funnels. Scripts embed interactive widgets, set cookies for visitor segmentation, and fire conversion events to track funnel performance across campaigns.

Manage consent for TikTok

ConsentStack automatically detects and manages TikTok trackers so your site stays compliant with global privacy regulations.