Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For correct operation, you should use 'utfUTF-8' encoding on the page. Otherwise, any non-Latin symbols will be corrupted. The page category must not be longer than 75 characters.

...

Code Block
languagejs
<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

Nrich Website Tag adds a special function into 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. The function may be called anywhere on the page after the N.Rich Website Tag has loaded. Usage example of the function:

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

This function may be called in anywhere on the page after the NRich Website Tag installation. This The function will add the specified page category and can be called several times. If called several times, each call will update the page category to a new value. Example:

...