Install Tracking Script
Add one JavaScript snippet to your site. Takes under 60 seconds. Works with React, Next.js, Vue, Svelte, plain HTML — any framework or CMS.
1. Copy the tracking snippet
Replace YOUR_PUBLIC_KEY with the public key shown in your Metrivo dashboard under Websites.
HTML
<script async src="https://metrivo.co/tracker.js" data-site="YOUR_PUBLIC_KEY"></script>2. Installation by framework
3. Verify installation
After adding the script, visit your site and check your Metrivo dashboard. The first pageview should appear within a few seconds. You can also open your browser's devtools network panel — look for a POST to /api/track on metrivo.co returning 200.
If you don't see data after 5 minutes, check:
- The script URL is correct: https://metrivo.co/tracker.js
- Your public key is correct (Dashboard → Websites → copy public key)
- Your Content Security Policy (CSP) allows scripts from metrivo.co
- No ad-blocker is blocking the script (common in dev environments with strict extensions)