This article gives one example of how to add the script to Google Tag Manager. For any issues with Google Tag Manager, contact Google Support.
This section gives instructions on how to set up Google Tag Manager. For installation, see Setup and Install Tag Manager for instructions from Google on how to install Tag Manager.
Log in to Google Tag Manager and access the account and workspace for the website.
Click New Tag/Add a new tag. The tag creation page opens.
In the name field, replace the text Untitled Tag with a name for the new tag.
Click in the Tag Configuration section. The tag type list opens.
Locate and select Custom HTML.
The Tag Configuration pane opens. Paste the script into the Custom HTML section.
For instructions, visit Add the Script.
If only Consent Manager is needed, it is not a requirement to load the entire script. The minimum requirement for setup of Consent Manager is:
<script type="text/javascript"> window._monsidoConsentManagerConfig = {
token: "YOURTOKEN"
}
</script>
<script src="https://monsido-consent.com/v1/mcm.js" type="text/javascript">
Click in the Triggering section. The Choose a trigger page opens.
Click to select All Pages with type Page View.
It is possible to select specific pages instead of All Pages. This is useful to remember if you need to exclude some pages.
This section provides instructions on how to set up advanced configurations in Google Tag Manager to use with Consent Manager.
This section provides instructions on how to create triggers in Google Tag Manager to use with Consent Manager.
Add the trigger in Google Tag Manager:
In the Other section, choose Custom Event.
The Trigger Configuration window opens.
In the Trigger Configuration window, in the Event name section, enter an event name, for example:
cookie_consent_marketing
Click Tags in the menu on the left side of the page. The Tags window opens.
Click New.
Click in the Tag Configuration field.
Select Custom HTML in the tag types list.
The Tag Configuration page opens.
In the HTML field, type in the script. For example:
<script>
//Marketing script requires that marketing cookie category consent is given
</script>
cookie_consent_marketing
with:cookie_consent_all
: All-purpose consent givencookie_consent_essential
: Essential consent givencookie_consent_basic
: Basic interactions and functionalities purpose consent givencookie_consent_marketing
: Marketing (targeting and advertising) purpose consent givencookie_consent_analytics
: Analytic purpose consent givencookie_consent_personalisation
: Personalization (Experience enhancement) consent given.Google Tag Manager includes some features that determine how the tags behave in response to the end-user cookie consent choices.
Some tags can set cookies. In order for the Consent Manager solution to retain those tags, triggers need to be created and set on those tags. The trigger retains the tag until the user interacts with the banner, by opt-out or opt-in.
This section gives instructions on how to create triggers in Google Tag Manager to use with Consent Manager.
In Google Tag Manager:
Choose Custom Event.
The Trigger Configuration pane opens.
The dialog closes and the trigger is present in the list.
To create other types of triggers, replace cookie_consent_marketing with:
For more information, visit Consent Manager Attributes.
This section gives an example of how you can use Google Tag Manager to set up triggers for consent checks on tags.
Scroll down into the Triggering section and click Edit (icon of a pencil) on the top right corner of the page.
A new container opens.
Select the trigger(s).
This section provides instructions on how to exclude the script on specific pages with Google Tag Manager.
For example, if a trigger exception is set to "Page URL equals thankyou.html", the tag will never fire on the page "thankyou.html".
Tip: Use advanced Tag Sequencing settings to cause the tag to ignore its own triggers and instead fire as part of the sequence.
To remove a trigger from a tag configuration, or to create an exception:
Click Tags in the menu on the left side of the page. The Tags window opens.
Click the name of the tag to edit. The Tag configuration window opens.
Select a trigger in the Triggering section.
The Trigger configuration window opens.
This question is concerning a setup where the tracking and compliance manager is deployed in a script via Google Tag Manager. This section provides instructions on how to opt out of statistics tracking when you use Consent Manager.
Set a trigger on Statistics (for example, on Analytics).
Make sure to set Statistics as the first tag to fire. The trigger analytics will prevent the cookie from the statistics to fire. That trigger only fires if the user accepts all cookies or analytics.
From the dashboard, navigate to the script setup section.
For more information, visit Add the Script.
Select only Statistics. Configure the module if needed.
if the module needs an edit, the new script must replace the old. It is normaily best to configure from the start.
For more information, visit Statistics Feature Setup.
Return to the Acquia Optimize dashboard and navigate to the script setup section again.
For more information, visit Add the Script.
Select only Consent Manager. Configure the module if needed.
if the module needs an edit, the new script must replace the old. It is normally best to configure from the start.
For more information, visit Consent Manager setup.
For more information, visit:
For instructions from Google on how to install Tag Manager, visit:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Tue Aug 12 2025 08:35:21 GMT+0000 (Coordinated Universal Time)