Skip to content
Documentation
Installation

Install Talvess with Vue.js

Add the tracker to your Vue app's shared HTML entry point.

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

For a Vue app built with Vite, add the script inside the head of your root index.html.

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

index.html
<html lang="en">
  <head>
    <script
      defer
      src="https://YOUR_TALVESS_DOMAIN/script.js"
      data-website-id="YOUR_WEBSITE_ID"
    ></script>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>

Keep your existing Vue entry script and app element. Your entry filename may differ from this example. If you use Nuxt, follow the Nuxt.js guide instead.

See the Vue project setup 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.