Change record status: 
Introduced in branch: 
3.1.x
Introduced in version: 
3.1.1
Description: 

Version 3.1.1 introduces new callback mechanisms for JavaScript. This makes it possible to comply with Google Consent Mode v2. There are three new Klaro services that use Consent Mode in conjunction with Google Tag Manager:

  • Google Tag Manager (GTM) with Google Consent Mode v2 (gtm_gcm2)
  • Google Analytics with GTM and Google Consent Mode v2 (ga_gcm2)
  • Google Ads with GTM and Google Consent Mode v2 (gads_gcm2)

If you have been using Google Tag Manager or Google Analytics, please check whether you would like to use the new services. You can find the config files here: https://git.drupalcode.org/project/klaro/-/tree/3.1.x/config/install?ref...

See also the config example on klaro.org.

If you use JavaScript callback functions in other services, please rewrite them to use the new functions onInit(), onAccept(), and onDecline, as the previous callback method will be deprecated in a future version.

Recipe google_consent_mode

These services are installed only during the initial installation. Updates typically do not make any changes to the services or install new ones. If you installed the module prior to version 3.1.1, you can install the new services using the recipe `modules/contrib/klaro/recipes/google_consent_mode`; this will also rename the existing apps for Google Tag Manager and Google Analytics. Please note that any translations you may have made will not be updated.

Impacts: 
Site builders, administrators, editors