Skip to main content

Hash-based routing

Plausible Analytics integrates automatically with pushState based frontend routers. However, if you're using a frontend framework that uses the URL hash for routing, you need to take an extra step to install the hash-based tracker instead of the default one. This is the same process you need to follow with Carrd and other website builders that don't support normal navigation.

The hash-based tracker is available by changing your script to load instead of the default

Here's what the full script tag will look like:

<script defer data-domain="" src=""></script>

If you're using a proxy, you can add the .hash.js as follows:

This tracker will change two things about how events are collected:

  • Trigger pageviews on the hashchange event
  • Normally the hash part of the URL is discarded in your Plausible dashboard. In hash-mode, the hash part is preserved in your stats so you can see the different pages your visitors have viewed.