Varde on Nuxt
Add Varde to a Nuxt app with one module. Client-side route changes are counted automatically.
Install
npm install nuxt-varde// nuxt.config.ts
export default defineNuxtConfig({
modules: ['nuxt-varde'],
varde: { site: 'YOUR_SITE_ID', autoEvents: true },
});Track goals
Use track() from any component. Calls made before the script loads are queued.
<script setup lang="ts">
import { track } from 'nuxt-varde';
</script>
<template>
<button @click="track('signup', { plan: 'pro' })">Sign up</button>
</template>Options
| Option | What it does |
|---|---|
site | Your site ID. Required. |
autoEvents | Counts outbound links, file downloads, email and phone clicks. |
ignorePages | Paths to skip, for example ['/admin*']. |
hash | Counts #/route changes as pageviews. |
enabled | Set to false to turn tracking off for example in development. |
Check that it works
Open your site in a normal browser window. The add-site screen shows Connected once the first pageview arrives, and the dashboard fills in within a few minutes. If nothing shows up, see the checklist at the bottom of Install on your platform.
Other platforms
WordPressNext.jsAstroDocusaurusLovableShopifyWebflowFramerSquarespaceWixGhost