Google Consent Mode tags fired before consent mode defaults
This problem occurs when a Google tag is loaded before the Google Consent Mode default state is set.
CookieTractor will automatically set the default state for Google Consent Mode, but for this to work, our script must be loaded synchronously (render-blocking) before any Google tags like Google Tag Manager, Google Analytics, etc.
Checklist for script-tag
- Ensure that our script tag is placed as early as possible at the beginning of the <head> section.
- Ensure that the async attribute has not been added to our script tag. This might introduce race conditions and other issues when our script fails to set the Consent Mode Defaults before you load Google Tags. To guarantee this, the script tag must be render-blocking. Using async on the script tag might introduce race condition issues with our YouTube and Vimeo replacement feature as well.
Checklist for Google Tag Manager
If you are using Google Tag Manager, we strongly recommend that you follow our installation guide and use our Tag Template. Our tag should be triggered with the trigger Consent Initialization - All Pages. The tag template will ensure that Google Consent Mode default state is set before any other tags are loaded.
Using a Custom HTML tag to load our script could result in race conditions.