-
-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add example for Google Tag Manager's consent mode #751
base: master
Are you sure you want to change the base?
Conversation
…ocs/google-consent-mode # Conflicts: # docs/advanced/assets/google-consent-mode.png # docs/advanced/google-consent-mode.md
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for cookieconsentv3-playground canceled.
|
When testing with Google Tag Assistant I noticed two issues with this example:
// Set default consent to 'denied'
gtag('consent', 'default', {
[SERVICE_AD_STORAGE]: 'denied',
[SERVICE_AD_USER_DATA]: 'denied',
[SERVICE_AD_PERSONALIZATION]: 'denied',
[SERVICE_ANALYTICS_STORAGE]: 'denied',
[SERVICE_FUNCTIONALITY_STORAGE]: 'denied',
[SERVICE_PERSONALIZATION_STORAGE]: 'denied',
});
gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}'); |
@orkun1675 thx, you are totally right, fixed it. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is working for me now by the way. We are using this on a live website. |
The script in this example will result in a fine-grained consent experience for the user.
The following services can be toggled separately:
Preview: https://stackblitz.com/edit/stackblitz-starters-pybz8y?file=script.js
Closes #669
Related to #110