Here is a draft instruction of how to install N.Rich website tag using GTM. Tag also could be installed directly, or via some other tag manager tool using similar logic
N.Rich tag could be configured to use in a 2 ways:
cookieless, means that tag will skip all 3rd party syncs and will not generate any cookies
standard version, which is more functional, and should be used if cookie consent was granted, because could provide much more analytics
Both versions are practically the same tag, but with a different configuration section:
var config = { // it mean standard version cookieless: false, };
Installation via tag manager (GTM)
Logic for tag installation is the following:
Wait till Cookie consent management system initialization
Pass cookie consent status to some variable
Fire N.Rich website tag and configure it using a variable from the previous step
Same logic could be used in any other tag management system.
In GTM you can use the following steps:
Go to “Variables“
Click “New“ in “User-Defined Variables“
Variable type is depends on your consent management system, but most probably it will be “
Data Layer Variable“Go to “Triggers“ and create a trigger for the N.RIch website tag. Tag should be fired after cookie consent initialization. Usually consent management systems provide some way to understand that consent status was initialized and you can create a custom event, to catch it and use as a trigger.
Go to “Tags“ and create a new tag for the N.Rich. You need to choose “Custom HTML” type and paste code from the https://app.nrich.ai/setup to “HTML“ field. Code should be changed, to use a variable from (3) for standard vs cookieless configuration. You also need to choose a trigger from a (4) as a trigger for the tag. See screenshot as an example of a typical setup:
here we are using ConsentGranted == 0 condition, to calculate cookieless status of the tag, so if ConsentGranted is 0 tag will be cookieless, and standard version in all other cases. You can use another logic, which is suitable in your particular case