Cookie banner (GTM)

The integration of the cookie banner is quite a bit more technical than the iFrames, and the work required will be impacted by the number of cookie scripts used. However if you follow the steps below, installing the banner should be no problem.

Before starting these steps, please make that following conditions are met however:

  • Your cookie policy has been published and is accessible via the "How to integrate my cookie policy and my banner?" button on your policy dashboard.

  • You know which are the scripts used to install cookies on your website, and you are able to make slight modifications to them.

  • You have a Google Tag Manager container set up for your website (ideally with all existing cookie scripts already present).

Step 1: Copying the banner code

You can copy the banner code directly from the integration page. To do so, simply go the integration page via your dashboard.

You can easily copy the full code by clicking the "Copy" button at the end of the code block.

Log into Google Tag Manager and select the container in which you want to publish the banner.

In the left navigation bar, click “Tags” to manage the tags in your container, and create a new tag.

In the tag creation screen, first change the name (Untitled tag) of the tag so that you can easily recognise the tag later. Then click on the “Tag configuration” box. In the tag type list, scroll down and select “Custom HTML”.

In the tag creation screen, copy the banner code into the HTML box. Once copied, check the box “Support document.write”. 
Once both of these actions have been performed, click the “Triggering” box.

In the list of triggers, select “Consent Initialization - All Pages”.

Before saving, make sure following parameters are correctly set:

  • The name of the tag has been changed to be easily recognisable

  • The banner code was fully copied into the HTML box

  • The box “Support document.write” has been checked

  • The trigger is set to “Consent Initialization - All Pages”

If all parameters have been correctly set, you can save your tag.

To allow our banner to properly identify your cookie scripts, it is important that their code gets slightly modified. This will allow our banner to block or allow a script to be run, based on the decisions made by the user.

You will need to make similar changes as the standard integration, however GTM has the upside of already having bundled most of your cookie scripts.

Once you have found the relevant cookie script(s), following changes should be made:

  1. Change the attribute type to text/plain

  2. Add an attribute data-cookieconsent={scriptType }, where {scriptType } should be replaced by the relevant cookie category, according to the following conventions:

    • necessary

    • functional

    • marketing

    • statistic

For any cookie script that is not handled via GTM, please refer to our standard integration guide.

Step 4: Updating your banner

Whenever you create a new version of the banner in your Admeet application, your banner will update automatically on your website. This means that other than publishing the new version in the Admeet application no work needs to be done.

This way your banner is always up-to-date on your website, without having to adapt any code or text on your website.

If you also add new cookies on your website as a result of your new version, please refer to step 5.

If you decide to start using some new cookie scripts on your website, you will need to do two things:

  • Adapt the cookie script, in the same way as mentioned above in Step 3, to assure that our banner can properly identify the new script.

  • Update your cookie policy and banner in the Admeet application, as mentioned above in Step 4, to make sure your website is always up to date.

Done with your cookie banner? Good news, you just finished the most challenging part!

Last updated