Google Consent Mode (GCM)
Closed this issue · 3 comments
over-engineer commented
We need to implement Google Consent Mode (GCM) on our plugin.
Consent mode lets you communicate your users’ cookie or app identifier consent status to Google. Tags adjust their behavior and respect users’ choices.
Consent mode receives your users’ consent choices from your cookie banner or widget and dynamically adapts the behavior of Analytics, Ads, and third-party tags that create or read cookies.
Source: https://support.google.com/google-ads/answer/10000067
A few key points to keep in mind:
- We can integrate with Google tag (
gtag.js
) by callinggtag('consent', ...)
to set the default consent state, which may differ for each region, and update the consent state- Consent mode doesn’t save consent choices. We should update the consent status as soon as a user interacts with the consent banner. After a user grants consent, we should persist their choice and call the update command accordingly on subsequent pages (refer to Update consent state for more information)
- For Google Tag Manager (GTM) users, we can create a consent mode template
- Consent mode templates can be uploaded to the Community Template Gallery to be shared with all Tag Manager users
- Regions are specified as ISO 3166-2 codes
- There are two consent modes (refer to About consent mode and Basic versus advanced consent mode for more information)
- Basic consent mode
- Prevent Google tags from loading until a user interacts with the consent banner
- No data are transmitted to Google prior to user interaction with the consent banner
- Advanced consent mode
- Google tags load when a user open the website
- By default, consent will be denied
- While consent is denied, the Google tags send cookieless pings
- Only when a user grants consent to data collection, Google tags send the full measurement data
- Basic consent mode
- Consent mode v2 contains two additional parameters —
ad_user_data
andad_personalization
(refer to Upgrade to consent mode v2 for more information) - These are 7 built-in consent types (refer to Consent state and consent types for more information).
ad_storage
— Enables storage, such as cookies, related to advertising.ad_user_data
— Sets consent for sending user data to Google for online advertising purposes.ad_personalization
— Sets consent for personalized advertising.analytics_storage
— Enables storage, such as cookies, related to analytics (for example, visit duration).functionality_storage
— Enables storage that supports the functionality of the website or app such as language settings.personalization_storage
— Enables storage related to personalization such as video recommendations.security_storage
— Enables storage related to security such as authentication functionality, fraud prevention, and other user protection
- Exposing
onAccept
and/oronChange
events/callbacks, via our globalpressidiumCookieConsent
object, will allow developers to use our plugin to integrate with even more services (refer to the Control programmatically section of our wiki for more information about what’s already available)
Nikodemsky commented
Any ETA for that?
over-engineer commented
@Nikodemsky Hey, sorry for the late reply. It should be ready in the next few days.
over-engineer commented
This was addressed in 1.4.0
, which was just released. Closing as resolved.