Nuxt
Install
npm install @antlytics/nuxt
Usage
Register the module and add your tracking ID in nuxt.config.ts:
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@antlytics/nuxt'],
antlytics: {
trackingId: 'YOUR_TRACKING_ID',
},
})
The module injects the hosted tracker.js, which:
- Sends a pageview on initial load
- Tracks SPA navigations (
pushState/replaceState/popstate) - Uses a 30-minute idle visit timeout with sticky first-touch UTMs
- Sends engagement beacons (scroll depth + active time)
Options
| Option | Required | Default | Description |
|---|---|---|---|
trackingId | Yes | — | UUID from Antlytics → Sites |
apiHost | No | https://www.antlytics.com | Use your own first-party proxy |
Verify data is flowing
Start your dev server (nuxt dev) and open the app in a browser. Check the real-time count in your Antlytics dashboard — data appears within seconds.
See Troubleshooting for common issues.
Something missing? Get in touch and we will update these docs.