Skip to content

Conversation

Debatty-Tom
Copy link
Contributor

@Debatty-Tom Debatty-Tom commented Oct 9, 2025

Cover #23.

Added gtm method which display the good script tag if user consent.

If a GTM id is set in the .env at the GOOGLE_TAG_MANAGER_ID key or in the config/cookieconsent.php file, the default script for gtm is set to denied the google tag manager access.

In the config, you will also find the gtm_consent key, which is an array of the different categories of cookies defined by Google Tag Manager that you can modify.

Google Analytics and Google Tag Manager use the same cookies which means it's not necessary to use both. If you only need Google Anlaytics, use the google method. If you need the Google Tag Manager you can use the gtm method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant