Hash routing
Hashrouting is a method of routing in web applications where the URL contains the # symbol, followed by a path that defines the current view or state of the application. It is used for navigation within a page without reloading it, and changes occur on the client side. For example, the URL could be: https://example.com/#/home.
All OneDollarStats integrations — whether it’s the NPM package or the CDN script — do not automatically detect if you are using hash routing.
If you are using hash routing, you need to add the hashRouting property in the configure function, or pass the data-hash-routing attribute if you are using the CDN script.
configure({
hashRouting: true,
});If you provide the attribute, the script will preserve paths with the # symbol without trimming them. If you do not provide the attribute, the script will trim paths containing the # symbol.