INSTALL / NUXT

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

OptionWhat it does
siteYour site ID. Required.
autoEventsCounts outbound links, file downloads, email and phone clicks.
ignorePagesPaths to skip, for example ['/admin*'].
hashCounts #/route changes as pageviews.
enabledSet 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