Installing the Snoobi script


The following script should be placed on all pages of your website. Preferably in a header or footer so that new pages will automatically have the script.

 

NOTE: It is possible that there is a different script on your website. If that is provided by Snoobi or your Snoobi partner, you should use that.
The information below is for sites where the Snoobi tracking is on snoobi.eu. Depending on your country or partner, the link to 'eu2.snoobi.eu' can differ for your installation

 

<!-- Snoobi siteanalytics V2.4 -->

<script type='text/javascript'>

var _saq = _saq || [];

(function() {

var account = 'snoobiaccountname';

var snbpagename = '';

var snbsection = '';

var snbcookies = 'session';

var anchors = '1';

var snbscript = document.createElement('script');

snbscript.type = 'text/javascript';

snbscript.async= true;

snbscript.src = ('https:' == document.location.protocol ? 'https://' : 'http://')

+ 'eu2.snoobi.eu/?account=' + account

+ '&page_name=' + snbpagename

+ '&section=' + snbsection

+ '&anchors=' + anchors

+ '&cookies=' + snbcookies;

var s = document.getElementsByTagName('script')[0];

s.parentNode.insertBefore(snbscript, s);

})();

</script>

 

  • Replace snoobiaccountname by the name of your Snoobi account, such as: company_com, or account33556
  • If necessary, change the following settings (ask Snoobi Support for assistance):
  • Make snbcookies = session; if persistent cookies are not allowed. Or set cookies programmatically.
    NOTE: You can also use none, 0 or off instead of Session
  • Make anchors = '0' or 'false'if analyzing url's with # gives undesired results
  • snbpagename and snbsection can be filled from the CMS, or leave unchanged.
  • NOTE: Change nothing else in the script and do not remove any characters such as (') and (;).

 

Simple Snoobi script

  • This simple code can be used if you don't expect to need specialized tracking and then functions in the same way as the extended tracking code.
  • Replace snoobiaccountname by the name of your Snoobi account, such as: company_com, or account33556
  • Make snbcookies = session; if persistent cookies are not allowed. Or set cookies programmatically. 

<script src="https://eu2.snoobi.eu/?account=snoobiaccountname&cookies=false"></script>

Websites built in WordPress

 

For websites that are built in WordPress, you can use the special WordPress plugin to install the tracking code.
Search for 'Snoobi' in the WordPress plugin directory

 

Snoobi script and Google Tag Manager

The Custom HTML Tag type in GTM allows you to deploy the Snoobi script to your website

To create the Custom HTML tag for Snoobi:

 

  • Click Tags and then New, then give this a descriptive name
  • Click Tag Configuration and select Custom HTML.
  • Copy the tag code provided (either the full code or the short form) and paste it into the HTML field.
  • Note: do not forget to change accountname to the id provided by Snoobi
  • Ensure the Custom HTML is triggered on every page, add this as a trigger.

 

If needed, select Support document.write to enable calls to document.write() in your JavaScript code.

 

To inspect differences between versions of your custom HTML tags:

  • Click Versions
  • Click a version entry that has the version of the custom HTML tag that you would like to inspect.
  • In the Version Changes card, click the name of the custom HTML tag to view the configuration changes.
  • Click View details View Details to expand the code with differences highlighted.

 

Finally, publish the changes to your website