# Umami

Replace an Umami snippet and keep compatible event calls.

kogut does not import Umami's history. Keep its database if you need the old reports.

## Replace the script

1. Open **Settings → Sites → Add site** in kogut and enter your domain, such as
   `acme.com`.
2. Change the host in your existing snippet to your kogut address:

   ```html
   <script defer src="https://kogut.acme.com/script.js" data-website-id="94db1cb1-74f4-4a40-ad6c-962362670409"></script>
   ```

3. Open your site and check **Analytics** for the visit.

kogut ignores the website id and uses the registered site matching the page's host or
closest parent domain. The native tag is in
[The tracking script](https://docs.kogut.dev/web-apps/tracking-script/).

## Check existing events

`data-umami-event` attributes and named `umami.track(name, props)` calls keep working.
`umami.track()` without a name and `umami.identify()` do nothing.
[Custom events](https://docs.kogut.dev/web-apps/events-and-goals/) lists property types and limits. Events are
stored but not shown in the panel, API, or MCP.

Remove unsupported options such as `data-host-url`, `data-auto-track`, and `data-domains`.
To change the event endpoint, use `data-api`. kogut always tracks page views and drops
URL fragments and query parameters except the supported campaign parameters.

## Add people

Umami's users do not carry over. Add them in **Settings → People**, or let them sign in
through [OpenID Connect](https://docs.kogut.dev/sign-in/openid-connect/) or
[forward auth](https://docs.kogut.dev/sign-in/forward-auth/). See [Roles](https://docs.kogut.dev/sign-in/roles/).

## Compare before switching off Umami

To compare reports, keep both scripts for a while. If Umami defines `window.umami`,
kogut leaves it alone, so send events to kogut with `kogut.track()`.

Expect differences in visitor counts, bot filtering, and client-side navigation: kogut
adds daily visitor counts over longer ranges. See
[visitor ids](https://docs.kogut.dev/web-apps/privacy/#the-visitor-id) and
[single-page apps](https://docs.kogut.dev/web-apps/single-page-apps/). Then remove Umami's script.
