Antlytics logoAntlytics

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 automatically injects a client-side plugin that:

  • Sends a pageview on initial load (app:mounted)
  • Sends a pageview on every route change via Vue Router's afterEach hook

Options

OptionRequiredDefaultDescription
trackingIdYesUUID from Antlytics → Sites
apiHostNohttps://www.antlytics.comUse 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.