Vue and Nuxt

Nuxt gets a module that registers a client-only plugin. Plain Vue 3 (Vite) gets a component that renders nothing. Both load the tracker once and follow client-side navigation.

Setup

Run init

It signs you in, creates the site, writes the environment variable and adds the module or component.

npx satsu-analytics init

Skip to Verify it works if init finished. To do it by hand, continue with the next steps.

Or install the package yourself

npm install satsu-analytics

Set the site ID

Create a site in the dashboard (Sites → your site → install) and put its ID into your env file.

In .env:

sh
NUXT_PUBLIC_SATSU_SITE=YOUR_ID

Nuxt maps it onto runtimeConfig.public.satsuSite at runtime.

Add the module or component

In nuxt.config.ts:

ts
export default defineNuxtConfig({
  modules: ["satsu-analytics/nuxt"],
});

Verify it works

Run your dev server. On localhost the tracker itself is not loaded; the component sends one dev ping per page load so the install check can confirm the setup, and it is never counted or shown in your stats. After you deploy, follow Verify it works to see the first real visit.

Next: track custom events and type them from your goals. Prefer no package? The script tag works too.