Skip to content
Documentation
Installation

Install Talvess with Nuxt

Load the tracker across your Nuxt app with its global head configuration.

Register your website

Sign in and add your website. Register its exact origin, including the protocol, hostname, and any port. Copy the script URL and website ID from your generated setup snippet.

Add the script

In Nuxt 3 or 4, add the tracker to the global app.head.script configuration in nuxt.config.ts.

Replace YOUR_TALVESS_DOMAIN and YOUR_WEBSITE_ID with the values from setup. Add the highlighted lines to your existing file.

nuxt.config.ts
export default defineNuxtConfig({
  app: {
    head: {
      script: [
        {
          src: "https://YOUR_TALVESS_DOMAIN/script.js",
          defer: true,
          "data-website-id": "YOUR_WEBSITE_ID",
        },
      ],
    },
  },
})

Merge this entry into your existing app and head settings. Keep other script entries already configured for your project.

See the Nuxt global head configuration documentation for the framework's configuration details.

Verify installation

  1. Publish your changes and open your website in a browser.
  2. In Talvess, open your website menu, choose Check installation, then Run checks.
  3. Open Analytics and select a date range that includes your visit.

The tracker records the first pageview and follows pathname changes in single-page applications. Do not add a separate pageview call for route changes. Query-string and hash-only changes do not count as pageviews.

If your site uses Content Security Policy, allow your Talvess origin in script-src and connect-src. If visits do not arrive, follow the troubleshooting guide. Read what is collected for browser storage and privacy details.