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, see the user guide article:
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.
Click Save to save the tag and activate it.
This section gives instructions on how to set up advanced configurations in Google Tag Manager to use with Consent Manager.
This section gives instructions on how to create triggers in Google Tag Manager to use with 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, "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 then 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 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 page 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 given
cookie_consent_essential
: Essential consent given
cookie_consent_basic
: Basic interactions and functionalities purpose consent given
cookie_consent_marketing
: Marketing (targeting and advertising) purpose consent given
cookie_consent_analytics
: Analytic purpose consent given
cookie_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:
Click Triggers from the menu on the left side of the page. The Triggers page opens.
Click New. The trigger configuration window opens.
Type a name in the Name field (for example, "Monsido Consent Manager Marketing Consented").
Click in the Trigger Configuration section. The Trigger Type menu opens.
Choose Custom Event.
The Trigger Configuration pane opens.
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:
This section gives an example of how you can use Google Tag Manager to set up triggers for consent checks on tags.
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 top right 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.
This section gives 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.
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.
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 statistics tracking when you use 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.)
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 dashboard, navigate to the script setup section.
For more information, see the user guide article:
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, see the user guide article:
Add the HTML script to the tag created in Google Tag Manager.
Get the Consent Manager script.
Return to the Acquia Optimize dashboard and navigate to the script setup section again.
For more information, see the user guide article:
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, see the user guide article:
Add the HTML script to the tag created in Google Tag Manager.
For more information, see the user guide articles:
For instructions from Google on how to install Tag Manager, see:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Tue Oct 22 2024 21:50:45 GMT+0000 (Coordinated Universal Time)