Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Google Consent Mode defaults (all denied)

Tells Google tags that visitors haven’t agreed to cookies yet, until your cookie banner says they have. Load it before Google Analytics or Tag Manager.

  • Type HTML
  • Runs Public site, in <head>
  • Tested with WordPress 7.1
HTML
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push( arguments ); }
// Google Consent Mode v2: denied until your cookie banner sends
// gtag( 'consent', 'update', { ... } ) after the visitor accepts.
gtag( 'consent', 'default', {
	ad_storage: 'denied',
	ad_user_data: 'denied',
	ad_personalization: 'denied',
	analytics_storage: 'denied',
	wait_for_update: 500
} );
</script>

Good to know

Your cookie banner must send the “update” when visitors accept (most do). Snipfire Pro can hold scripts back until consent instead.

In these packs

  • Privacy and GDPR: Keep less personal data and send less of it to other companies.
  • Analytics and pixels: The usual tracking codes, ready to paste your ID into. Administrators’ visits aren’t counted.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.