Skip to content

Nuxt and Vue

The CLI prints the snippet for Nuxt instead of editing files (and exits with code 1, asking you to place it). Add it in nuxt.config; with a pinned version, copy integrity and crossorigin: 'anonymous' into the entry too:

export default defineNuxtConfig({
app: {
head: {
script: [{ src: 'https://collect.plaintrace.dev/t.js', async: true, 'data-site': '<site id>' }],
},
},
})

For a Vite-built Vue app, the CLI adds the script to index.html. Router navigations are recorded automatically in both.