Adding cookie code to Google Tag Manager in combination with Serverside Tagging
AdPage Tagging is a partner of Cookiecode.co.uk. Our tracking specialists have already set up various CMPs such as cookiebot, cookieyes, and Iubenda. The advantage of cookiecode is that you are dealing with a Dutch party with a legal background. This makes it easier in terms of communication, and there is more focus for their customers.
To install cookiecode, follow these steps:
Download the CookieCode GTM template from https://portal.cookiecode.nl/company/documents/template.tpl.
Go to Google Tag Manager web container and upload this template by going to templates (1) and then new (2)
Then click import
Select the template and click save
Go to the overview of tags and click on 'New' at the top right !
Name the tag 'CookieCode' and click 'Tag configuration' to choose the tag.
From the list, select the tag named 'CookieCode'.
Then click on 'Triggers' to set a trigger for the tag.
Here, select 'Consent initialisation - All Pages'.
Triggers only need to be created for tracking cookie groups, i.e. cookies
for which permission must be requested from the website visitor.
To ensure that cookies are only set when the visitor gives permission,
separate triggers need to be created that are fired by CookieCode when consent is given.
permission is there.
In this step, the triggers are created. The names of these triggers always follow the pattern
'cookiecode.consent.<identifier>'. Table 4.1 provides a list of common identifiers, but the
exact list for the specific website can be found in the partner portal (under 'cookie groups').
In the example below, we add a trigger for Hotjar. The identifier of this cookie group
concerns 'hj', so Hotjar's trigger is called 'cookiecode.consent.hj'.
Add a new trigger with the name 'cookiecode.consent.hj' and the type 'custom event'.
Also specify 'cookiecode.consent.hj' as the event name and press 'save'.
To ensure that tags that set cookies that require consent are only executed if
executed only if this permission is present, the triggers of these tags should be adjusted.
Below as an example the tag from Hotjar. This was linked to 'All pages', but has now been
adjusted so that it is linked to cookiecode.consent.hj. As a result, the tag is only executed with
permission of the visitor.
Go to Templates and select the CookieCode template
Follow the video below to complete the consent. The settings below are mainly focused on Dutch regulations.
To install cookiecode, follow these steps:
Download the CookieCode GTM template from https://portal.cookiecode.nl/company/documents/template.tpl.
Go to Google Tag Manager web container and upload this template by going to templates (1) and then new (2)
Then click import
Select the template and click save
Go to the overview of tags and click on 'New' at the top right !
Name the tag 'CookieCode' and click 'Tag configuration' to choose the tag.
From the list, select the tag named 'CookieCode'.
Then click on 'Triggers' to set a trigger for the tag.
Here, select 'Consent initialisation - All Pages'.
Triggers only need to be created for tracking cookie groups, i.e. cookies
for which permission must be requested from the website visitor.
To ensure that cookies are only set when the visitor gives permission,
separate triggers need to be created that are fired by CookieCode when consent is given.
permission is there.
In this step, the triggers are created. The names of these triggers always follow the pattern
'cookiecode.consent.<identifier>'. Table 4.1 provides a list of common identifiers, but the
exact list for the specific website can be found in the partner portal (under 'cookie groups').
In the example below, we add a trigger for Hotjar. The identifier of this cookie group
concerns 'hj', so Hotjar's trigger is called 'cookiecode.consent.hj'.
Add a new trigger with the name 'cookiecode.consent.hj' and the type 'custom event'.
Also specify 'cookiecode.consent.hj' as the event name and press 'save'.
To ensure that tags that set cookies that require consent are only executed if
executed only if this permission is present, the triggers of these tags should be adjusted.
Below as an example the tag from Hotjar. This was linked to 'All pages', but has now been
adjusted so that it is linked to cookiecode.consent.hj. As a result, the tag is only executed with
permission of the visitor.
Turn on Google Consent Mode V2
Go to Templates and select the CookieCode template
Follow the video below to complete the consent. The settings below are mainly focused on Dutch regulations.
Updated on: 16/08/2024
Thank you!