1. N.Rich Knowledge Base
  2. Website Tag Installation

N.Rich Tag Installation using iubenda CMP

Learn how to install the N.Rich tag if you are using iubenda CMP for cookie management.

Overview

The following guide aims to help you install the N.Rich Tag if you use iubenda CMP and Google Tag Manager to manage tags on your website.

It assumes that you are familiar with basic Google Tag Manager concepts and iubenda Cookie banner was already installed on your website.

Explanation for the concept

This setup involves creating two tags:

  1. N.Rich Bootstrap Tag: A “safe” tag that initializes the N.Rich script without enabling cookies, allowing it to fire before user consent is granted.

  2. N.Rich Allow Cookies Tag: This tag activates only if the user grants marketing consent, allowing N.Rich to use cookies for advanced tracking.

By following these steps, you’ll ensure the N.Rich tag complies with GDPR and other privacy regulations while delivering effective marketing data.

How-to

The implementation of the N.Rich Website Tag is divided into three steps to ensure proper functionality and compliance with consent management. Each step is essential for a compliant and effective implementation. Follow the steps carefully to set up the N.Rich tag.

Step 1 (optional): Creating Trigger in GTM

This part is optional because you might already created such a trigger for other tags before. Before starting with it please check if you already have this trigger in Triggers list

Here we are going to create a trigger, which would be used to allow N.Rich tag to use cookies. Basically it’s a short summary for the Google Consent Mode: Set up Google Tag Manager with iubenda article, so in case any troubles you could check the original article from Iubenda.

Creating Iubenda GTM Consent Event Trigger

This trigger could be used later by any tags if consent is required for them to fire.

  1. In the left-hand menu, go to Triggers and click New.

  2. Select Custom Event as the trigger type.

  3. Name the trigger (e.g., Iubenda GTM Consent Event ) and configure it to match the consent event fired by Iubenda - iubenda_gtm_consent_event.

  4. For “This trigger fires on“ choose “All Custom Events

  5. Save the trigger.

Step 2: Creating N.Rich Bootstrap Tag

The N.Rich Bootstrap Tag initializes the N.Rich script in its safe mode (cookies disabled) and must fire on all pages. Follow these steps to create it:

  1. Create a new tag.

    • In the left-hand menu of GTM, go to Tags and click New.

    • Click Tag Configuration and select Custom HTML.

  2. Add the N.Rich code.

    • Obtain the N.Rich script from your N.Rich platform account.

    • Copy the script and paste it into the HTML box in GTM.

  3. Set the trigger.

    • Under Triggering, click Add Trigger.

    • Select the existing All Pages trigger.

  4. Save the tag.

    • Name the tag (e.g., “N.Rich Bootstrap”) and save it.

Google Tag Manager N.Rich Bootstrap Tag2

Step 3: Create the N.Rich Allow Cookies Tag

The N.Rich Allow Cookies Tag allows the N.Rich script to use cookies, ensuring it only fires when the user grants cookie consent. Follow these steps to set it up:

In this example, we assume that N.Rich tag is under Measurement section in your cookie classification. If you want to put it to Marketing please use the consent name from the table in Iubenda docs

  1. Create a new tag in GTM.

    • In the left-hand menu of GTM, go to Tags and click New.

    • Click Tag Configuration and select Custom HTML.

  2. Add the N.Rich enable cookies code.

    • Copy the following code and paste it into the HTML box:

    •  <script> window._nrich = window._nrich || []; window._nrich.push(["enableCookies",true]); </script>
  3. Set the trigger for marketing consent.

    • Under Triggering, click Add Trigger.

    • Choose Iubenda GTM Consent Event trigger which was created in Step 1.

    • Click on “Advanced Settings“

      • In Consent Settings choose “Require additional consent for tag to fire

      • In the text field below set analytics_storage (reminder that you could use another consent level here if required)

  4. Save the tag.

  • Name the tag (e.g., “N.Rich Allow Cookies”) and save it.

Google Tag Manager N.Rich Allow Cookies Trigger2

Google Tag Manager Advanced Settings 2

Step 4: Test Your Implementation

Before publishing your changes, we strongly recommend testing your setup using Preview Mode in Google Tag Manager. This helps ensure that everything works as expected and prevents issues caused by misconfiguration or conflicts.

  1. Enable Preview Mode.

    • In GTM, click Preview in the top-right corner to activate Preview Mode.

  2. Verify the tags.

    • Navigate to your website while Preview Mode is active.

    • Use the GTM debugging panel to confirm that:

    • The N.Rich Bootstrap Tag fires on all pages.

    • The N.Rich Allow Cookies Tag fires only when marketing consent is granted.

  3. Check for conflicts or errors.

    • Ensure both tags load without errors or conflicts with other scripts on your website.

  4. Publish the changes.

    • Once you’ve verified the setup, return to GTM and click Submit to publish your container.