PubConsent
Web Standard Integration

Gtag Integration (Consent Mode)

2min

The following guide shows how to send the update consent signal to gtag through the mapping offered by PubConsent.

This documentation is intended to provide a detailed overview of each setting in Google’s Consent Mode, strictly following the explanations and guidelines as provided by Google. It does not imply that the Consent Mode settings are designed to satisfy or address any particular regulatory requirements.

The complete explanation of how Google's consent mode works is available at the following link: https://support.google.com/google-ads/answer/10000067

Before following this guide, make sure that the PubConsent integration code available in the configurator is present on the page.

Make sure you have followed the steps provided by the Google documentation at the following link: https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced

Add the following script to set the default consent status, before the CMP script integration code:

JS


After configuring the default state of the consent mode, you need to configure the callback that will allow you to execute the update with the values of the consent mode taken from the user's consent.

JS