N.Rich Tag Installation using Google Tag Manager & Cookiebot.

The following guide aims to help in the N.Rich Tag installation if you are using Cookiebot and Google Tag Manager together to manage tags on your website.

Please note that you are going to need a customized HTML tag file instead of using the standard one. Please consult the N.Rich team to get the file.

The following needs to be configured in your own container:

  1. Login to your GTM container. Make sure there are no unpublished changes.

  2. Go to Templates → Variable Templates → Search Gallery → Cookiebot Consent State. Click "Add to workspace" and confirm by clicking "Add".

  3. - Go to Variables → User-Defined Variables → New.
    - Name your variable "Cookie consent" (the name of the variable is important here because it is used in the N.Rich tag on the next steps).
    - The variable type should be "Cookiebot Consent State". → Click "Save".

  4. If you have previously attempted to install any N.Rich tags prior to following this guide, go to Tags. Pause or remove all previously installed N.Rich tags (if any) to have a clean slate. (N.Rich team will provide you with a file with a custom HTML tag. Once you have received the custom HTML tag, you can proceed with the next steps).

    4.1 Add a new Custom HTML tag and paste the content from the customized file provided to you by N.Rich (custom HTML tag).
    4.2 Choose "All pages" as a trigger. There is a small piece of code that is needed only for debugging (it prints N.Rich tag type to the console before firing it), it's not needed in Live mode, we suggest removing it after all verifications (see comments in the tag code that was provided to you).

  5. Depending on your Cookiebot configuration you may also need to whitelist N.Rich cookies in Cookiebot config (optional step).

We advise testing implementation in Preview mode ( in case of misconfiguration or conflict) before publishing it for all users.

Practically it is working in a way that Cookiebot consent status will be populated to the Cookie consent variable as a string with all permissions, we are using a small script to extract the consent status of the marketing to use it later in the N.Rich tag configuration.