Using Cookies with TikTok Pixel

Last updated: August 2024

Cookies are used to match events with people who engage with your content on TikTok. Matched events are used to improve measurement and optimize ad campaigns. They can also contribute to building your retargeting and engagement audiences. Depending on your settings and those of your visitors, they can help build your retargeting or engagement audiences.



Note: For best performance results, we recommend using Advanced Matching with cookies.


By using cookies with Advanced Matching, you can further improve and supplement the matching of visitors on your website with people on TikTok. Benefits of matching include:

  • Measure more conversions: Increase conversions by connecting ads seen on TikTok to conversion events that happen on your website, app or store. This will help you better understand ROI and the impact of your TikTok ads.

  • Improve ad delivery and decrease CPAs: Identify and deliver ads to people who are more likely to take a desired action on your app or website. This increases efficiency and decreases costs.

  • Expand your reach: Match your website visitors with people on TikTok, therefore expanding audience sizes for solutions like web retargeting.


About first-party and third-party cookies

Cookies are identifiers tied to an individual's web browser that are used to better match events with people on TikTok. There are two types of cookies:

  • First-party cookies are used to recognize a person on one domain only- the domain where the cookie was created. These cookies are created and owned by your website and enabled by default with the TikTok Pixel. You can disable use of first-party cookies in your pixel settings.

  • Third-party cookies are created and owned by TikTok via TikTok's server and extend beyond individual domains. Third-party cookies can be used to recognize and match events across different websites and are on by default with the TikTok Pixel. Use of third-party cookies are expected to deprecate in 2025.

  • Pangle cookies work only in regions Pangle supports and they are read rather than set by TikTok Pixel.

    • In jurisdictions where advertisers have access to Pangle and deliver ad campaigns via the Pangle Ad Network, the TikTok Pixel may also collect Pangle cookies for measuring ad campaigns.


To learn more about how and where we use cookies across our TikTok platform, read our TikTok Business Products (Data) Terms.


Availability

Both first-and third-party cookies are enabled by default for TikTok Pixel and partner-integrated pixels. First-party cookies can be disabled from within your account's pixel settings.

Advertisers using Events API cannot use third-party cookies, but have the option to pass first-party cookies through a dual pixel and events api setup to enable better matching. Consult a technical resource to get started.


The following partners are eligible for first- and third- party cookies: Shopify, BigCommerce, ECWID (Lightspeed), Square, SHOPLINE, Loja Integrada, BASE, Kyte, Vtex, SalesforceCC, Cafe 24.


Before you get started

  • Check to see if the data connection solution you're using is eligible to use this feature.

  • With the impending deprecation of third-party cookies, we recommend you also activate our Advanced Matching feature for event matching.

  • Evaluate what course of action(s) you need to take to ensure your website and privacy practices are compliant under applicable law. For example, this can include obtaining consent where needed or updating privacy disclosures where needed. We recommend consulting with your legal representative.

  • If you are required to obtain consent for cookie usage, ensure your website disables the setting and usage of cookies when a person declines consent by using a tag manager or a third-party consent management platform.


How to use cookies with the TikTok Pixel

You can configure cookie usage in your pixel settings in Events Manager, your options include:

  1. Maintain the default setting and use first- and third- party cookies with the TikTok Pixel

  2. ​Use only third-party cookies with the TikTok Pixel and disable first-party cookies

    • You can choose to not use first-party cookies with your pixel and only use third-party cookies by toggling first-party cookie usage off in your pixel settings. With this option, you will not maximize your pixel's full matching and attribution capabilities.

Use only third-party cookies with the TikTok Pixel GIF

Disable cookies when an individual opts out

To instruct the pixel on when to use cookies when a person accepts or declines consent, we suggest the following:

  • If you are required to obtain consent for cookie usage, ensure your website disables the setting and usage of cookies when a person declines consent by using either a tag manager or a third-party consent management platform or TikTok's pixel consent mode to support the individual's choice. To learn more about TikTok's cookie consent mode, see our guide here.

  • If you're using Google Tag Manager, you can use Google's Consent Mode to help you customize how Google tags behave before and after people make their consent decisions.

  • If you don't have technical resources or a tag manager, TikTok Pixel integrates with many third-party consent management platforms. These platforms may also offer technical resources and implementation options, including banner design and more.

If you have already implemented the APIs, please remove the enable/disable functions from your website and instead, use a tag manager or consent management platform to control the firing of your pixel base code. Leaving the APIs to remain in your code will not affect performance or visitors but may be redundant if you are using a consent management mechanism.


Actions Required

Evaluate what course of action(s) you need to take to ensure your website and privacy practices are compliant under applicable law. For example, this can include:

  • Determine whether you are required to obtain opt-in consent before transferring data to TikTok via Pixel. Our TikTok Business Products (Data) Terms are not changing with this update, and require that you obtain consents, where applicable by law, prior to activating pixel and setting and reading cookies and IDs.[a][TikTok Business Products (Data) Terms][https://ads.tiktok.com/i18n/official/policy/business-products-terms]

  • If you are required to obtain consent, you should ensure cookies are disabled for individuals who opt out by using a tag manager or a third-party consent management platform.

  • You should also, as required, provide clear and comprehensive information to people in a sufficiently prominent notice regarding the access to, and collection, sharing and usage of cookies.

  • Please always ensure your cookie disclosures and notices are compliant with your practices. We recommend checking with your legal representative for guidance.


Specifications about TikTok Cookies

- ​Cookie name: _ttp

- Cookie Domain: Your website domain

- Duration: 13 months from the last date it was used

- Type: 1st party

- Function: Advertising cookies

- Description: To measure and improve the performance of your advertising campaigns and to personalize the user's experience (including ads) on TikTok.

- Cookie name: _ttp

- Cookie Domain: .tiktok.com

- Duration: 13 months from the last date it was used

- Type: 3rd party

- Function: Advertising cookies

- Description: To measure and improve the performance of your advertising campaigns and to personalize the user's experience (including ads) on TikTok.

- Cookie name: _pangle

- Cookie Domain: analytics.pangle-ads.com

- Duration: 13 months from the last date it was used

- Type: 3rd party

- Function: Advertising cookies

- Description: To measure and improve the performance of your advertising campaigns and to personalize the user's ad experiences delivered by the Pangle ad network.


FAQs

I'm using a partner integration, am I eligible to use cookies with my website?

Yes, first and- third-party cookies are available for partner integrated pixels.


My website already collects consent and discloses cookie usage. Do I need to do anything else?

You're a few steps ahead! Just verify with your legal representative that your website's privacy policy is up-to-date and includes TikTok cookie disclosures. You should also ensure your website disables the use of cookies when a person declines consent.


When do cookies expire?

After 13 months from being set onto a browser, or last used, whichever is later.


Why should I enable Advanced Matching with cookies?

While you can use cookies without Advanced Matching, the matching capabilities and performance will be less effective. For the best matching of people on TikTok, especially with impending deprecation of third-party cookies, use Advanced Matching together with first- and third-party cookies.


By adopting cookie usage, will my pixel conversion window change?

No, allowing cookies will not change conversion windows. Cookies act as a "supplement" to Advanced Matching in terms of improving matches and attribution. Learn more about Attribution Manager to manage attribution settings.

What happens if I turn off first-party cookie usage at a later date after initially having it on?

If you turn off first-party cookie usage, we will not set any new first-party cookies moving forward. However, existing first-party cookies that have already been set prior will continue to operate as normal until they expire over time.


I don't have developer resources to update my website, what are my options?

TikTok Pixel integrates with many third-party consent management platforms. These platforms may also offer technical resources and implementation options, including banner design and more.


Am I required to obtain consent from people through a cookie banner?

Data protection laws differ from country to country. We require advertisers to provide notices and obtain consents, as required by applicable laws. Please review your requirements to determine if a banner and consent choice is required.