Skip to main content

Siteimprove Analytics: Custom Visit Tracking

Modified on: Thu, 12 May, 2022 at 2:46 PM

Using Siteimprove Analytics code, it is possible to create your own Visit Tracking which is not depending on page load events or changes in URLs.

To do this you will need to follow the following steps:

  1. Ensure that the Siteimprove script is present on all pages/partial pages that you want to track.
  2. Define the event that would trigger a new 'Pageview' - it can be a partial page load or any other change of content.
  3. Decide whether you would like to see the page views as views of different pages, or as many views of a single page. 

If you want to see page views as views of different pages, then you must define pseudo changes in the URL that would be the most descriptive for you. For example, views of different parts of the page ‘’ could be tracked as,,, etc.

Note: If you plan on using the hash symbol (#), please replace it with ‘/hash/’ instead. This is because by default, ‘#’, and everything following, is stripped from URLs in the Siteimprove platform.

  1. Add the following JavaScript code to be executed when the new pseudo page load event happens:

       "url": "new page URL",

       "ref": "current page URL",

       "title": "new page title"

  • new page URL = new pseudo URL that should be recorded,
  • current page URL = used in the same way as 'document.referrer', URL that was visited before,
  • new page title = page title for the new pseudo page.

For example, if a user came from to, then when the new part of the page is loaded (i.e. you could send the following data:


       "url": "",

       "ref": "",

       "title": "
Section 2"


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.