Skip to main content

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 :

  1. Go to on your Google Analytics dashboard https://analytics.google.com/
  2. In the left-hand side panel, click on Admin

Google Analytics administration menu

  1. In the page, find the section Data collection and modification
  2. Then click on Data streams menu

Google Analytics data streams menu

  1. Click on data stream you wish to integrate to open the stream details
  2. And copy measurement ID using the button

Google Analytics copy measurement id

Implementing Google Analytics with GTM

  1. Return on Google Tag Manager
  2. On the left-hand side panel, click on the Tags menu
  3. Then click on New button

Google Analytics add new tag

  1. Click on Tag configuration section
  2. Then in the left-hand side panel, select Google Analytics

Google Analytics selection de google analytics

  1. The click on Google tag template

Google Analytics select google tag for GA4

  1. Paste the previously copied ID (see above) into Tag ID field

Google Analytics paste measurement id into tag

  1. In the accordion Consent Settings located in Advanced Settings, you can see that your tag is already ready to use Google Consent Mode signals

Google Analytics GCM signals in tag

  1. In triggering section, add the All Pages trigger

Google Analytics GCM signals in tag

  1. Then, name and save the tag

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 :

  1. Activate the Enable GCM option in the Advanced settings section

Google Analytics enableGCM in notice configuration

Tag GTM configuration

If you have implemented AppConsent CMP using the GTM tag, check that the enable GCM property is enabled.

Google Analytics verifier si enableGCM est actif dans GTM

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.

Google Analytics modify web implementation