---
title: "Analytics"
description: "Visitors, page views and custom events for every app, without cookies or a consent banner."
canonical_url: "https://docs.dev.lightdrop.cloud/guides/analytics"
---
# Analytics

> Visitors, page views and custom events for every app, without cookies or a consent banner.

Every app gets usage analytics without any setup: visitors, page views, top pages, referrers,
countries, browsers, operating systems and devices. Open the app's **Analytics** page in the
dashboard, or run `wervt stats <app>`:

```sh
wervt stats my-app              # last 7 days
wervt stats my-app --range 24h  # 24h, 7d, 30d or 90d
wervt stats my-app --json       # for scripts and agents
```

The app list shows how many people used each app today.

## What is counted

- **Page loads**: the runtime counts every HTML document it serves with a 2xx status. Assets,
`/api/*` routes, prefetches and bots aren't counted.
- **Client-side navigations**: after the first load, a Nuxt app navigates in the browser.
`@wervt/nuxt` reports each navigation with a small beacon (`POST /_wervt/view`).
- **Signed-in users** (private apps): a count of distinct users per day, never who visited what.
- **Custom events**: `useWervtTrack()` sends an event with an optional label:

```vue
<script setup lang="ts">
const track = useWervtTrack()
</script>

<template>
  <a href="https://twitch.tv/me" @click="track('click', 'twitch')">Twitch</a>
</template>
```

Events show up on the Analytics page and in `wervt stats` with how often they were sent. To stop
reporting navigations and events, set `wervt: { analytics: false }` in `nuxt.config.ts`; page
loads are still counted by the runtime.

## Privacy

Analytics follow the same rules as Plausible or Cloudflare Web Analytics, so apps don't need a
cookie banner for them:

- **Nothing is stored on or read from the device**: no cookies, no `localStorage`, no
fingerprint kept in the browser.
- **No IP addresses or user agents are stored.** The runtime passes them to the control plane,
which only uses them in memory to build a visitor hash, then drops them. Of the user agent only
browser, OS and device class are kept.
- **Visitors are counted per day.** The hash uses a salt that changes every day and is deleted
after it, so visitors can't be followed across days or re-identified. A visitor on two days
counts as two.
- **Data minimisation**: query strings are dropped (they may contain tokens or emails), only the
referrer's host is kept, and the country comes from Cloudflare's `cf-ipcountry` header.
- **Retention**: raw page views for 30 days, daily totals for about 13 months.
- **Own servers**: the data stays in your wervt's Postgres; nothing goes to a third party.
- **Do Not Track and Global Privacy Control** are respected: such visits aren't counted.

The legal basis is legitimate interest (Art. 6 (1) (f) GDPR) in anonymous reach measurement.
Apps still have to mention it in their privacy policy. A text to start from:

> **Usage statistics.** To see how this app is used, we count page views without cookies and
> without storing your IP address. Your IP address and browser identifier are only used,
> combined with a value that changes daily, to tell visits on the same day apart; they are not
> stored. We keep the page, the referring website (domain only), your country and the type of
> browser, operating system and device. This data never leaves our servers and does not allow
> us to identify you. Legal basis: Art. 6 (1) (f) GDPR (legitimate interest in anonymous reach
> measurement). If your browser sends "Do Not Track" or "Global Privacy Control", you are not
> counted.

<note>

This is not legal advice. Check the text against your app before you rely on it.

</note>

## Outside wervt

The analytics are a library of their own, [`@wervt/analytics`](https://www.npmjs.com/package/@wervt/analytics):
headless, with a Postgres store and a browser tracker, for any Node server. See its README.


## Sitemap

See the full [sitemap](https://docs.dev.lightdrop.cloud/sitemap.md) for all pages.
