You can set categories to any page on your website and use this category with N.Rich analytics. N.Rich Website tag allows two ways to perform this:
Define page category using the tag configuration
Define page category using Javascript on the page
For correct operation, you should use 'UTF-8' encoding on the page. Otherwise, any non-Latin symbols will be corrupted. The page category must not be longer than 75 characters.
Define page category via tag configuration
Sample of default N.Rich Website Tag code:
...
Code Block | ||
---|---|---|
| ||
<script type="text/javascript"> var config = { cookieless: true, page_category: 'Automotive', }; !function(n,a,t,i,f,y){n[t]=n[t]||function(){(n[t].q=n[t].q|| []).push(arguments)},n[t].l=1*new Date,f=a.createElement(i),f.async=true,y=a.getElementsByTagName(i)[0] ,f.src='https://serve.nrich.ai/tracker/assets/tracker.js?'+t,y.parentNode.insertBefore(f,y)} (window,document,'nt','script'),nt('load','{tag_uuid}', config); </script> |
Define page category via a Javascript function call
N.rich Website Tag adds a special function to the page to perform additional actions. The name of the function is nt
. You can use this function to define the page category as an alternative to using the tag configuration. This function will be available on any page including N.Rich Website Tag and may be called anywhere on the page once the page has loaded. Usage example of the function:
...