🆒 Your use case
Tiktok Pixel supports consent mode where consent can be held and explicitly granted/revoked at a later time. While consent is being held, events will be queued until the user grants or revokes consent, in which case events will either be sent or held in queue. Documentation can be found here: https://business-api.tiktok.com/portal/docs/pixel-cookie-consent-mode/v1.3
🆕 The solution you'd like
This is somewhat similar to Google Analytics and Bing UET with their onBefore<script>Start, but not quite as the methods need to be added to the ttq.methods array. This should perhaps be an option like:
const script = useScriptTikTokPixel({
id: '<pixel id>',
defaultConsent: 'opt-in', // options could be 'opt-out' | 'opt-in'
})
Alternatives would also be welcome.
🔍 Alternatives you've considered
Alternative solution would be to use useScript and implement it manually.
ℹ️ Additional info
It's a bit unclear how to get access to the Tiktok methods from the current registry script as it also includes methods like enableCookie/disableCookie. It would be nice to have those implemented in some way too, but mostly as a nice to have.
🆒 Your use case
Tiktok Pixel supports consent mode where consent can be held and explicitly granted/revoked at a later time. While consent is being held, events will be queued until the user grants or revokes consent, in which case events will either be sent or held in queue. Documentation can be found here: https://business-api.tiktok.com/portal/docs/pixel-cookie-consent-mode/v1.3
🆕 The solution you'd like
This is somewhat similar to Google Analytics and Bing UET with their
onBefore<script>Start, but not quite as the methods need to be added to thettq.methodsarray. This should perhaps be an option like:Alternatives would also be welcome.
🔍 Alternatives you've considered
Alternative solution would be to use
useScriptand implement it manually.ℹ️ Additional info
It's a bit unclear how to get access to the Tiktok methods from the current registry script as it also includes methods like
enableCookie/disableCookie. It would be nice to have those implemented in some way too, but mostly as a nice to have.