Source: https://usedataowl.com/docs/vuejs
Markdown source: https://usedataowl.com/docs/vuejs.md
Description: Install lightweight cookieless web analytics, automatic route tracking, and error monitoring in your Vue.js 3 or Nuxt application in under 2 minutes.

# How to Add Web Analytics & Session Replay to Vue.js and Nuxt

**Vue with Vite:** paste the script inside `<head>` in `index.html`.

**Nuxt:** add it to `app.head.script` in `nuxt.config.ts`:

```ts title="nuxt.config.ts"
export default defineNuxtConfig({
  app: {
    head: {
      script: [{ src: "https://usedataowl.com/js/script.cookies.js", defer: true, "data-website-id": "YOUR_SITE_ID" }],
    },
  },
})
```

> Replace `YOUR_SITE_ID` with your site ID from the dashboard.

## Verify installation

After you deploy:

- Visit your live website.
- Open the **Realtime** page of your [DataOwl dashboard](/dashboard). Your visit shows up within a second, and the setup page says "Receiving events".

> DataOwl ignores localhost so you don't count your own development traffic. Add `data-allow-localhost="true"` to the tag to test locally. More options are in the [script configuration reference](/docs/script-configuration).
