> For the complete documentation index, see [llms.txt](https://docs.humblytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.humblytics.com/how-to-get-started/vuejs.md).

# Vue.js

Add Humblytics to your Vue.js or Nuxt app in about 5 minutes.

{% hint style="info" %}
**You need:** access to your app's HTML shell and a production deploy. Local Vite or Webpack dev servers won't verify.
{% endhint %}

## 1. Copy your tracking code

In Humblytics, open **Site settings → Install** and click **Copy tracking code**.

## 2. Add it to your app

**Vue (Vite or Vue CLI):** paste the snippet just before `</head>` in `index.html` (Vite, project root) or `public/index.html` (Vue CLI). It loads once, and Humblytics tracks Vue Router navigation on its own.

**Nuxt 3:** add both scripts in `nuxt.config.ts`. Replace `YOUR_ID` with the ID from your snippet:

```ts
export default defineNuxtConfig({
  app: {
    head: {
      script: [
        {
          innerHTML:
            "document.documentElement.style.opacity='0';window._hmblReveal=function(){document.documentElement.style.opacity='1'};setTimeout(window._hmblReveal,2000);",
        },
        { src: 'https://app.humblytics.com/hmbl.min.js?id=YOUR_ID', async: true },
      ],
    },
  },
})
```

<figure><img src="https://1281224403-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqZMBn2D7F1lV2hgGTS2X%2Fuploads%2FsQRHdaMtK6sUwA0lxuJw%2Fcustom%20code%20script.gif?alt=media&amp;token=670adf7b-a09d-4d95-888d-848e32016dca" alt=""><figcaption></figcaption></figure>

## 3. Deploy and verify

1. Deploy to production.
2. Back in Humblytics, click **Verify install**.
3. Open your live site in a private window and click around. Your visit appears in **Observe → Analytics → Overview** under **Live Activity** within about a minute.

**Not verifying?** Test the production URL, not `localhost`, and load the script once in the shell page, not inside a component.

Still stuck? See [Verify & Troubleshoot Tracking](/how-to-get-started/verify-and-troubleshoot-tracking.md).
