Leading Consent Management Platform

Compliant with GDPR, CCPA, COPPA, LGPD, PECR, PDPA, PIPEDA, and more.

TikTok Pixel Consent with UniConsent CMP

The UniConsent TikTok Pixel consent tag connects the TikTok Pixel to your UniConsent banner through the consent API of the pixel. The pixel waits until a visitor allows advertising, and stops again when the visitor withdraws consent, opts out in the US or sends a Global Privacy Control signal.

In your TikTok Pixel code, add ttq.holdConsent(); before ttq.load():

// the TikTok Pixel base code
ttq.holdConsent();
ttq.load('YOUR_PIXEL_ID');
ttq.page();

2. Add the tag

Add this tag after the UniConsent tag, on every page with the TikTok Pixel:

<script async src="https://cmp.uniconsent.com/v2/tiktok-consent.min.js"></script>

What it sends

UniConsent stateCall
ad_storage, ad_user_data and ad_personalization all grantedttq.grantConsent()
Any of them deniedttq.revokeConsent()

The tag calls the pixel only when the result changes, on page load and after every choice.

Notes

  • Google Consent Mode must stay enabled in your project, because the tag reads its values.
  • Without ttq.holdConsent(); before ttq.load(), the pixel sends events before the visitor makes a choice.
  • The tag works whether the pixel loads before or after it, including from Google Tag Manager.
  • Events your server sends to the TikTok Pixel conversions API are not covered: send them only for visitors who allowed advertising.

Still have questions?

Contact us: support@uniconsent.com