Install Analytise with React Router
One snippet in your HTML entry file. Works with Vite, Create React App and any React Router setup.
Add the snippet
- Open
index.html(Vite) orpublic/index.html(Create React App). - Paste the snippet inside the
<head>. - Rebuild and deploy.
<script
defer
data-domain="yourwebsite.com"
data-site-id="YOUR_SITE_ID"
src="https://www.analytise.com/js/tracker.js"
></script>Client-side navigation
The snippet tracks every full page load out of the box. Client-side transitions between routes don't fire additional pageviews in the current tracker version.
Verify it works
- Open your website in a new tab.
- The dashboard shows your visit under
onlinewithin a few seconds (live visitors update every ~15s). - Nothing showing? See Troubleshooting.
Next guide
Astro