Skip to main content

Adding Siteimprove Analytics JavaScript to your website

Heather Schneewind avatar
By Heather Schneewind

Siteimprove will send you the Analytics JavaScript code.  It will look like the code shown below.

Note: The 'XXXXX' below represents a numeric code that is specific to your account therefore do not use this exact code.

<script type="text/javascript">
/*<![CDATA[*/
(function() {
var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true;
sz.src = '//siteimproveanalytics.com/js/siteanalyze_XXXXX.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s);
})();
/*]]>*/
</script>

No matter how many websites you are tracking with Siteimprove Analytics you only need to use this one singular Analytics JavaScript code.

The Siteimprove Analytics JavaScript is asynchronous which means it will not affect your website’s performance, can work seamlessly with other JavaScript, and is not required to be placed in a specific location on your website.

We do however recommend that the script is always added at the bottom of the website in a footer or similar, just before the closing body-tag </body>

If you're new to Siteimprove, you can find the Analytics tracking code snippet in your Analytics module. If you are a current customer need to find your Analytics Javascript code, you can submit a ticket and our support team will be in touch.

It is likely you will need to take one of the following approaches in order to get the Siteimprove Analytics JavaScript on your site.

Add it yourself

If you are able to access the HTML of your website or your Content Management System has a field specifically for adding tracking code you will be able add the Siteimprove Analytics code to your site.

HTML

It is recommended that you place the Siteimprove Analytics JavaScript on every page of your website just above the closing body-tag which looks like this </body>

Add it in your CMS

In this instance, you will want to find the file for the footer of your website (in WordPress that is footer.php for example) and place the code above the closing body-tag, </body>

Have your website/CSM provider add it

In some cases, you will not have access to include files like your footer. If this is your situation you will need to contact your content management system provider and request that they insert the JavaScript on your behalf. The JavaScript should still be inserted just above the closing body tag, </body>.

There can be a cost associated with this so be sure to inquire about fees with your website provider.

Add it through a Tag Manager

If you utilize a tag management service like Google Tag Manager you can still utilize Siteimprove Analytics by adding the Analytics JavaScript through the tag manager. Be sure to follow the instructions for your tag management tool of choice to install it correctly.

Important: Please ensure that the Siteimprove Analytics script is configured to load asynchronous in your Tag Manager.

If we use Google Tag Manager as an example you will want to paste the Tag Manager script on your site first. Once that is done you need to log in to the Tag Manager account and create a new Custom HTML Tag.

Next, add the JavaScript (1).

In 'Advanced Settings' change 'Tag firing options' to 'Unlimited' (2).

Finally, chose triggering that includes firing script on DOM/page load, like: 'DOM Ready', 'Page View' or 'Window Loaded' (3).

 

Was this article helpful?
7 out of 8 found this helpful