Install the tracking script in Vue.js or Nuxt
Add the snippet to index.html for Vue or to app.head in nuxt.config.ts for Nuxt. History mode is tracked automatically; hash mode needs supr-hash.
Your snippet is in Settings → General of the website (the gear next to its name on the dashboard), with its id and domain filled in. The examples below use YOUR_WEBSITE_ID and yourdomain.com: replace them with yours.
<!doctype html>
<html lang="en">
<head>
<script
defer
supr-website-id="YOUR_WEBSITE_ID"
supr-domain="yourdomain.com"
src="https://supranalytics.app/js/script.js"
></script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>export default defineNuxtConfig({
app: {
head: {
script: [
{
src: "https://supranalytics.app/js/script.js",
defer: true,
"supr-website-id": "YOUR_WEBSITE_ID",
"supr-domain": "yourdomain.com",
},
],
},
},
});Vue Router's history mode is tracked automatically. With hash mode (createWebHashHistory), add supr-hash="true": see Hashed page paths.
Check it works
Open your website in a normal browser window, then the dashboard: the visit shows up within seconds, and the install card on a new website turns into the dashboard by itself. Nothing after a minute? See Not seeing any data.
AI agent or LLM? Read this page as Markdown