Skip to content

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:

  1. Whether you have decided to use Basic or Advanced Google Consent Mode.
  2. 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.




Tag (Consent settings)Trigger
Require additional consent for tag to fire (e.g., analytics_storage)Custom Event trigger: cookifi-consent-update

Example

Cookifi - GTM - Basic Mode - page view based google tag




Tag (Consent settings)Trigger
No additional consent required.Initialization - All Pages

Example

Cookifi - GTM - Advanced Mode - page view based Google tag




If you’re integrating tracking scripts without GTM, ensure you follow the correct order for execution:

  1. Google Consent Mode Default command (provided by Cookifi)
  2. Cookifi Integration code (provided by Cookifi)
  3. 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.

If you are not using Google Consent Mode Default & Update commands, you have two alternatives:

  1. 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.

  2. Use blocking triggers
    Block tags using exceptions unless the relevant consent is granted.


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.