This article covers:
- Getting your version of the script
- Adding the code manually
- Configuring CSP rules
- Add the code in your CMS
- Siteimprove Frontier Analytics courses
Reach out to Siteimprove technical support if you have any questions regarding the code.
Getting your version of the script
Note: Only Administrators and Account owners have access to the Analytics Script page in the platform.
For customers subscribed to Analytics
You can find your version of the Siteimprove Analytics script on the Analytics Script page on the platform (Requires login).
To navigate to the page go to Analytics > Analytics Settings > Tracking > Analytics Script from the left-hand menu.
Note: The 'XXXXX' in the code below represents a numeric code that is specific to your account so Do Not use this exact code below.
<script async src="https://siteimproveanalytics.com/js/siteanalyze_xxxxx.js"></script>
For customers not subscribed to Analytics (i.e. Traffic)
Customers not subscribed to Analytics can still take advantage of our Traffic features. You can find your version of the Siteimprove Analytics script on the Traffic data providers page on the platform (Requires login).
To navigate to the page go to Settings > Content > Traffic data providers from the left-hand menu.
Click on the button "Get script" and copy the code from the pop-up.
Adding the code manually
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.
Configuring CSP rules
If you're using Content Security Policy (CSP) you need to add rules to make sure that data collection works correctly.
Allowing the tracking script
Your account specific tracking script should be added to your allow list. This can be done by extending the script-src rule to include siteimproveanalytics.com. If you want to be even more restrictive, you can change the inclusion to include,
As an example, consider the existing CSP rule for a website:
Now if we add our rule it will look like this:
script-src: 'self' siteimproveanalytics.com;
Allowing the data delivery
Your account specific tracking script delivers data back to our collectors. This is done by loading a pixel, which essentially is a very small 1x1 image. Therefore, your CSP needs to allow loading our pixel images. This can be done by extending the img-src rule to include *.siteimproveanalytics.io.
To be even more restrictive, you can change the inclusion to include,
You have the possibility to add even more restrictive rules, however, this can result in data not being collected if you change some collection configurations.
As an example, consider the existing CSP rule for some website:
Now we add our rule and then the rule ends ups looking like:
img-src: 'self' *.siteimproveanalytics.io;
Add the code 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/CMS provider add it
There can be a cost associated with this so be sure to inquire about fees with your website provider.
Add code through a Tag Manager
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.
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).
Siteimprove Analytics courses
Siteimprove Frontier offers scalable learning programs, interactive course content, and actionable outcomes for you and your team. Take advantage of our online courses and certification to get the most out of our products.
- Web Analytics Fundamentals (1hr)
- User Feedback and Analytics Settings (30mins)
- Analytics Overview and Live Analytics (30mins)
Reach out to Siteimprove technical support if you have any questions.
Did you find it helpful?Send feedback