Hash page paths
Track SPAs and section links that use the URL hash as the route.
Use only for real routes
Hash paths can inflate pageviews on anchor-heavy pages because every anchor click changes the hash. Enable this only when hashes represent real screens or routes.
Some sites use location.hash as the app route (for example /#/dashboard or /#pricing). The default Kobbe tracker only sends the pathname, so hash-only navigations do not create new pageviews.
Opt in to hash paths
Add data-track-hash="true" on the same <script> tag as the tracker:
<script
defer
data-token="YOUR_SITE_TOKEN"
data-track-hash="true"
src="https://app.kobbe.io/tracker.js"
></script>
When enabled:
- Page paths stored in Kobbe are
pathname+hash(for example/+#pricing→/#pricing). - The tracker listens for
hashchangeand records an extra pageview when the combined path changes. - Query strings are never sent or stored.
Raw API
Server-side or CLI sends can set "trackHash": true on the JSON body alongside path if the path includes a #fragment that should be stored. This must match what you send from the browser tracker for consistent behavior.
Related
- Script options — all
data-*attributes on the tracker. - Add the tracker — default install snippet.
- Exclude visits — path exclusions use the same stored path shape (including hash when this mode is on).