Install on Vue
For a Vite or Vue CLI build: one line in index.html, and Vue Router navigations track themselves.
Where the tag goes
Copy the exact snippet from your dashboard; the
data-site-id identifies the installation. Complete the
separate DNS or homepage meta-tag check described in
Get started to verify domain ownership.
This snippet starts measuring on load. Where consent is required, add data-require-consent before loading and wire acceptance and withdrawal to your consent manager. The consent guide includes the calls and pre-load queue.
Paste the tag into your index.html's <head>:
<script defer src="https://app.datastated.com/ds.js?v=2026-09-10-consent"
data-site="acme.com" data-site-id="dst_YOUR_SITE_ID"></script>
Vue Router in history mode counts navigations as pageviews (hash mode works too with data-hash-routing="true" on the tag)
automatically; there is no plugin to install and nothing to call.
Nuxt users: put the same tag in app.head.script in
nuxt.config.ts, or directly in the document template.
Verify it worked
Open your live site in a normal browser window and click around. The installation step on your dashboard detects the first recorded pageview. Domain verification is a separate step. Nothing arriving? Walk the troubleshooting list, and remember your own ad blocker or privacy flags silence the tag.
Questions? Email us at hello@datastated.com.