Manage de Google Analytics
Google Analytics management is integrated into the CMP using the GCM (Google Consent Mode) protocol. GCM blocks Google Analytics from depositing cookies or scripts before the user consent. The CMP may continue to block Google Analytics after the user's consent, depending on the user's choices.
On this page you'll find information on how to manage Google Analytics with AppConsent, depending on your implementation.
Implementing and configuring Google Analytics with GTM
Measurement ID retrieval
Before implementing Google Analytics, you need to retrieve your measurement ID. To do this, you need :
- Go to on your Google Analytics dashboard https://analytics.google.com/
- In the left-hand side panel, click on Admin
- In the page, find the section Data collection and modification
- Then click on Data streams menu
- Click on data stream you wish to integrate to open the stream details
- And copy measurement ID using the button
Implementing Google Analytics with GTM
- Return on Google Tag Manager
- On the left-hand side panel, click on the Tags menu
- Then click on New button
- Click on Tag configuration section
- Then in the left-hand side panel, select Google Analytics
- The click on Google tag template
- Paste the previously copied ID (see above) into Tag ID field
- In the accordion Consent Settings located in Advanced Settings, you can see that your tag is already ready to use Google Consent Mode signals
- In triggering section, add the All Pages trigger
- Then, name and save the tag
AppConsent configuration for Google Analytics (Google Consent Mode Advanced Mode - GCMv2)
For Google Analytics to be controlled by the CMP, GCM (Google Consent Mode) must be activated in the notice configuration and in the notice implementation (code or GTM).
Notice configuration
Before seeing to implementation, you must change the GCM parameters in the form for creating or editing a notice on the configuration interface. To do this, you need :
- Activate the Enable GCM option in the Advanced settings section
Tag GTM configuration
If you have implemented AppConsent CMP using the GTM tag, check that the enable GCM property is enabled.
Code implementation configuration
If you have implemented AppConsent CMP using code on your website, it will be necessary to change this implementation once enableGCM has been activated. The new code to be implemented is available in the list of notices under the modified notice.