Umami

Learn how to set up analytics in your Nuxt Starter Kit application.

This starter kit uses the nuxt-umami module to track page views and events. This module is a wrapper around the Umami, making it easier to integrate with Nuxt applications.

Umami is an open-source, privacy-focused web analytics tool that serves as an alternative to Google Analytics. It provides essential insights into website traffic, user behavior, and performance, all while prioritizing data privacy.

My recommendation is to self-host Umami. You can find the instructions on how to do this in the Umami documentation.

Other Analytics Providers

If you prefer to use a different analytics provider, you can easily do so by following these steps:

  1. Uninstall the nuxt-umami module:
    pnpm remove nuxt-umami
    
  2. Remove the nuxt-umami module: Open your nuxt.config.ts file and remove the nuxt-umami module from the modules array:
    export default defineNuxtConfig({
      modules: [
        // Remove this line
        'nuxt-umami',
      ],
    })
    
  3. Remove all references of the Umami environment variables starting with UMAMI_ from your code, GitHub Actions secrets and NuxtHub environment variables.
  4. Install the new analytics module: Depending on the provider you choose, you may need to install a different Nuxt module or use a custom script tag.