Skip to content

Instantly share code, notes, and snippets.

@stefanatcroud
Created December 6, 2023 09:42
Show Gist options
  • Save stefanatcroud/324173d14997ad0cc5ca7ca79239e73f to your computer and use it in GitHub Desktop.
Save stefanatcroud/324173d14997ad0cc5ca7ca79239e73f to your computer and use it in GitHub Desktop.
Google Consent Mode (CoMo) V2 Default Script
<!-- Google Consent Mode V2 -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied',
wait_for_update: 500
});
</script>
<!-- End Google Consent Mode V2 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment