Skip to Topics in this Article
Introduction
This guide gives instructions on how to add the Monsido script to Google Tag Manager.
Setup
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 pane slides open.
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 slides open.
Locate and select Custom HTML.
The Tag Configuration pane opens. Paste the Monsido script into the Custom HTML section.
Tip: See Add Script for instructions on how to compile the Monsido script.
Note: If only Consent Manager is needed, it is not a requirement to load the entire Monsido 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 pane slides open.
Click to select All Pages with type Page View.
Note: It is possible to select specific pages instead of All Pages. This is useful to remember if some pages need to be excluded.
Click Save to save the tag and activate it.
Advanced instructions
This section gives instructions on how to set up advanced configurations in Tag Manager to use with Consent Manager.
Add Triggers for Consent Manager tags
This section gives instructions on how to create triggers in Google Tag Manager to use with Monsido Consent Manager.
Add the trigger in Google Tag Manager:
Click Triggers on the menu on the left-hand side of the page. The Triggers page opens.
Click New. The trigger configuration window opens.
In the name field, type in a name (for example, "Monsido Consent Manager Marketing Consented").
Click in the Trigger Configuration section. The Trigger Type menu opens.
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
Leave the other options set to the default value and click Save.
The dialog closes and the trigger is present in the list.
Add a tag in Google Tag Manager for the trigger.
In Google Tag Manager, navigate to the Workspace Overview page.
Click Tags in the menu on the left-hand side of the page. The Tags window opens.
Click New.
In the name field, type in a name (for example, "Marketing script").
Click in the Tag Configuration field.
Select Custom HTML in the tag types list.
The Tag Configuration window opens.
In the HTML field, type in the script. For example:
<script>
//Marketing script requires that marketing cookie category consent is given
</script>Click Save. A dialog box opens with the message "No Triggers Selected".
Click Add Trigger and select the trigger that was just created.
Click Save. The tag creation window closes and the tag is on the list.
To create other types of triggers, replace
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.
Add Triggers to Control Cookies
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 Monsido 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 the Monsido Consent Manager module.
In Google Tag Manager:
On the menu on the left-hand side of the page, click Triggers. The Triggers page opens.
Click New. The trigger configuration window opens.
In the name field, type in a name (for example, "Monsido Consent Manager Marketing Consented").
Click in the Trigger Configuration section. The Trigger Type menu opens.
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.
Leave the other options set to the default value.
Click Save.
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, see the article in Monsido for Developers:
Add Consent Checks to Tags (set triggers)
In Google Tag Manager, navigate to the Workspace Overview page.
Click Tags in the menu on the left-hand side of the page. The Tags window opens.
Select the tag that sets cookies.
Scroll down into the Triggering section and click Edit (icon of a pencil) on the upper right-hand corner of the page.
A new container opens.
Select the trigger(s).
Click Save. The tag creation window closes and the tag is on the list.
Exclude the Monsido Script on Specific Pages
This section gives instructions on how to exclude the Monsido script on specific pages using 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-hand 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.
Click Edit (the pencil icon) to edit the trigger.
To add a trigger: Click Add (the plus sign icon) in the Firing Triggers section. The existing triggers list opens. Click to select a trigger from the list to add.
To remove a trigger, click Remove (a minus sign icon) on the same row as the trigger to remove in the Firing Triggers section.
To add a trigger exception, click on the link Add Exception. If any exceptions already exist, click Add (the plus sign icon). The existing triggers list opens. Click to select a trigger to exclude. The trigger is added to the Exceptions section on the Trigger Configuration page.
To remove a trigger exception, click Remove (a minus sign icon) on the same row as the trigger to remove in the Exceptions section.
How to opt out of Monsido tracking but keep Consent Manager
This question is concerning a setup where the tracking and compliance manager is deployed in a script via Google Tag Manager. This section gives instructions on how to opt out of the Monsido statistics tracking when using Monsido Consent Manager.
Create two custom tags in Google Tag Manager.
One tag for the Statistics script
One tag for the Consent Manager script.
Set both tags to run on all pages.
Set a trigger on Statistics (for example, on Analytics).
Important! 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.
Add the HTML script to the tag created in Google Tag Manager.
Get the Statistics script:
From the Monsido dashboard, navigate to the script setup section.
For more information, see the User Guide chapter:
Select only Statistics. Configure the module if needed.
Note: 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, see the User Guide chapters:
Add the HTML script to the tag created in Google Tag Manager.
Get the Consent Manager script.
Return to the Monsido dashboard and navigate to the script setup section again.
For more information, see the User Guide chapter:
Select only Consent Manager. Configure the module if needed.
Note: 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, see the User Guide chapter:
Add the HTML script to the tag created in Google Tag Manager.
For more information, see the User Guide chapters:
Additional information
For more information, see the User Guide chapters:
For instructions from Google on how to install Tag Manager, see:
For further assistance, contact the Monsido support team at support@monsido.com or via the Monsido chat and help features inside the application.
See Monsido for Developers for documentation containing advanced help files for developers.
Contact us
Monsido, an Optimere brand:
San Diego, CA, USA
5880 Oberlin Dr,
San Diego, CA 92121, USA
Australia & New Zealand
Suite 2.04
80 Cooper St
Surry Hills, NSW 2010
Copenhagen, Denmark
Borupvang 3
2750 Ballerup, Denmark
London, UK
14 New Street
London, EC2M 4HE