PureStats documentation
Vue
Install PureStats in Vue applications and track Vue Router navigation. Add custom events, exclude internal routes and avoid duplicate pageviews in your app.
Vue apps can load PureStats once in the application HTML file.
Basic setup
Add the tracker to index.html:
<div id="app"></div>
<script defer src="https://purestats.io/pf.min.js" data-domain="example.com"></script>
This records the first pageview and listens for History API navigation.
Vue Router
Vue Router's web history and hash history (#/ routes) are tracked automatically, so no router hook is needed. PureStats records one pageview per URL change and ignores repeats of the same URL.
Custom events
Track meaningful interactions:
window.purestats?.('Trial Started', {
source: 'onboarding'
});
Event names should be stable. Avoid encoding dynamic values in event names; put them in properties instead.
Excluding internal routes
If the app includes private routes such as /admin, add them to Excluded paths in Site settings → Privacy settings. This is easier to audit than adding conditional script loading across route components.