Update your tracking setup
This guide explains how to update your tracking setup to ensure all tags and scripts execute in line with user consent preferences.
How to follow this guide
Your setup will depend on two key factors:
- Whether you have decided to use Basic or Advanced Google Consent Mode.
- Whether Google Consent Mode Default & Update commands are enabled within Cookifi or not.
For this guide, we will assume you have enabled Cookifi to handle Default & Update commands for Google Consent Mode.
GTM implementation
Section titled “GTM implementation”Basic Mode
Section titled “Basic Mode”Tag (Consent settings) | Trigger |
---|---|
Require additional consent for tag to fire (e.g., analytics_storage ) | Custom Event trigger: cookifi-consent-update |
Example
Tag (Consent settings) | Trigger |
---|---|
Require additional consent for tag to fire (e.g., ad_storage ) | Custom Event trigger: cookifi-consent-update |
Example
Tag (Consent settings) | Trigger |
---|---|
Require additional consent for tag to fire (e.g., analytics_storage ) | no modifications needed to your original trigger |
Example
Advanced Mode
Section titled “Advanced Mode”Tag (Consent settings) | Trigger |
---|---|
No additional consent required. | Initialization - All Pages |
Example
Tag (Consent settings) | Trigger |
---|---|
Require additional consent for tag to fire (e.g., ad_storage ) | Custom Event trigger: cookifi-consent-update |
Example
Tag (Consent settings) | Trigger |
---|---|
No additional consent required. | no modifications needed to your original trigger |
Example
Tag (Consent settings) | Trigger |
---|---|
Require additional consent for tag to fire (e.g., ad_storage ) | no modifications needed to your original trigger |
Example
Code implementation (without GTM)
Section titled “Code implementation (without GTM)”If you’re integrating tracking scripts without GTM, ensure you follow the correct order for execution:
- Google Consent Mode Default command (provided by Cookifi)
- Cookifi Integration code (provided by Cookifi)
- Google tag (basic mode - check whether proper user consent exists before executing the code; advanced mode - activate without additional checks)
Cookifi handles the Update Consent commands.
Default & Update commands disabled
Section titled “Default & Update commands disabled”If you are not using Google Consent Mode Default & Update commands, you have two alternatives:
-
Use our Custom Event
cookifi-consent-update
. Use this event as a trigger to determine when consent updates occur. Check the values of each storage type (by retrieving the data into the data layer variables) before firing tags. -
Use blocking triggers
Block tags using exceptions unless the relevant consent is granted.
Other cookies
Section titled “Other cookies”In development
For cookies set outside GTM, such as those directly injected by your website platform or third-party tools, use Cookifi’s auto-blocking feature to prevent them from firing without consent.
After updating your implementation, it’s essential to test your setup to identify any issues or unexpected behaviour.
Ensure that:
- Tags fire correctly in line with user consent preferences.
- Google tags include the correct consent signals.