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

The N.rich Tag - Technical guide

The technical information regarding the installation of the N.Rich tag

This is a technical article

 

N.Rich functionality depends on a tag/pixel being installed on all pages that N.Rich is supposed to track for engagement. 

The tag has two modes of operation: 
a) Bootstrap - Limited data collection prior to the user granting consent. 
b) Cookie -  Full data collection after consent is granted. 

The recommended (and GDPR compliant) way of setting up the N.Rich tag is to ensure the Bootstrap tag is active on all marketing and landing pages of your platform, while the Cookie tag activates only when user user has been granted. 

Where to find the tag 

Head to https://app.nrich.ai/setup > Website Tag 

Screenshot 2025-08-18 at 14.22.44

The source code on the page is the Bootstrap version of the tag that can be safely installed to any page even before the user has granted marketing consent. Where you install the tag is up to you, the requirement on our end is primarily that the tag should be installed in every page you wish N.Rich to track. In case your landing pages are hosted separately from your primary website, make sure the N.Rich tag is installed on both platforms. 


How to switch the tag between Bootstrap and Cookie mode. 

Once consent has been recorded, pushing the following will switch the NRich tag into Cookie mode: 

<script>
window._nrich = window._nrich || []; window._nrich.push(["enableCookies",true]);
</script>

Similarly, pushing the the same script with ["enableCookies",false] will return the tag into the Bootstrap mode of operation. 


How the N.Rich tag's Bootstrap mode is GDPR compliant
 

In bootstrap mode, cookies are never set to the end user’s device. IP-address is used to associate the visitor with an account and visit timestamps are used to track the website session.

The N.Rich tag and Consent Management Platforms (CMP)

In case you are using a Consent management platform, make sure you have a variable indicating that a user has or hasn't given consent. Based on that variable, you should load the Bootstrapped mode whilst consent is absent and pass the "enableCookies",true parameter once consent is obtained. For more detailed instructions, see the per-CMP-platform guides here.

 

Tag parameter options 

Here is the list of all parameters pertaining to the N.Rich tag

  • setAudienceDomain - Required. Specifies the domain used to gather audience data. This is generally fixed. You should not modify it unless instructed by N.Rich support.

  • setTrackingDomain - Required. Defines the domain used to send tracking data. This is usually fixed and should not be modified.

  • setTrackingId - Required. The unique tracking ID for your account. 

  • enableCookies - Controls whether cookies are enabled for tracking.

    • true: Cookies are enabled (standard mode, allows session tracking, visitor counting, and intent scoring).

    • false: Default behaviour; Cookies are disabled (cookieless or bootstrap mode, some features will be limited).

    • Recommendation: Set this to true only if you have consent from your visitors to use cookies.

  • disableCookieSync - This parameter is optional and should be only used when necessary. Disables cookie synchronisation with other systems.

    • false: Default behaviour; cookies can sync across subdomains for better tracking consistency.

    • true: Disables cookie synchronization, which may be necessary for compliance with certain privacy regulations or technical setups.

    • Recommendation: Only enable this (true) if you have some specific reasons to not sync cookies with other systems. Disabling cookie sync will lead to suboptimal advertising performance as N.Rich can’t build proper audiences from your website visitors.

  • enableDebug - This parameter is optional and should be only used when necessary. Enables debug mode for troubleshooting and diagnostics.

    • true: Outputs detailed logs in the browser console to help you debug installation or configuration issues.

    • false: Default behaviour; no debug information is logged.

    • Recommendation: Use true temporarily while debugging issues, then revert to false for normal operation.


Example of the tag with all of the options above: 

<!-- N.Rich Website Tag 2.x -->
<script>
    !function(n,r,i,c,h){
        window._nrich=window._nrich||[];
        window._nrich.push(["setAudienceDomain","audience.domain"]);
        window._nrich.push(["setTrackingDomain","tracking.domain"]);
        window._nrich.push(["setTrackingId","unique_id"]);
        window._nrich.push(["enableCookies",false]);
       window._nrich.push(["disableCookieSync",false]);
       window._nrich.push(["enableDebug",false]);
       (c=document.createElement(n)).type="text/javascript";
        c.async=true;
        c.src=r;
        window[i] = window[i] || function(){window._nrich.push(Array.from(arguments));};
        (h=document.getElementsByTagName("script")[0]).parentNode.insertBefore(c,h);
    }("script", "https://j.nrich.ai/tag.js", "nt");
</script>



Page event tracking 

By installing the N.Rich tag into your website, you gain the ability to leverage the "nt" function. 

With it, it becomes possible to send events to the N.Rich platform that will become visible within your analytics.  

nt('send', 'event', {
  eventCategory: 'Outbound Link',
  eventAction: 'click',
  eventLabel: 'advertising click'
});



Page categories 

The 'nt' function also has the ability to pass page categories to N.Rich analytics via 

nt('set_meta', 'page_category', 'Business');