---
title: "Privacy-Friendly Analytics with Umami"
description: "Track page views and events in your Nuxt app with the nuxt-umami module and a self-hosted Umami instance, or replace it with another analytics provider."
canonical_url: "https://nuxtstarterkit.com/docs/analytics"
---

> Index of every page on this site: [llms.txt](https://nuxtstarterkit.com/llms.txt)

This starter kit uses the [nuxt-umami](https://nuxt.com/modules/umami) module to track page views and events. This module is a wrapper around the [Umami](https://umami.is/), making it easier to integrate with Nuxt applications.

The module is registered in the `core` layer (`apps/web/layers/core/nuxt.config.ts`). Set `NUXT_UMAMI_HOST` and `NUXT_UMAMI_ID` to connect your Umami instance.

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.

<tip>

My recommendation is to self-host Umami. You can find the instructions on how to do this in the [Umami documentation](https://umami.is/docs/guides/hosting).

</tip>

## 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:```bash
pnpm --filter web remove nuxt-umami
```
2. **Remove the nuxt-umami module**: Open `apps/web/layers/core/nuxt.config.ts` and remove the `nuxt-umami` module from the `modules` array:```ts
export default defineNuxtConfig({
  modules: [
    // Remove this line
    'nuxt-umami',
  ],
})
```
3. Remove the `umami` config from the same file and the `NUXT_UMAMI_*` variables from `apps/web/.env.example`, the `Dockerfile` secret mounts and your deployment 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.

## Sitemap

See the full [sitemap](https://nuxtstarterkit.com/sitemap.md) for all pages.
