---
title: Notes on Umami Analytics
date: 2025-12-29T11:50:31+00:00
modified: 2026-03-28T19:54:14+00:00
image:: https://kaspars.net/wp-content/uploads/2025/12/umami-session-scaled.png
permalink: https://kaspars.net/blog/umami-analytics
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
category:
  - Development
post_tag:
  - Open Source
  - Tool
  - Web
---

# Notes on Umami Analytics

I recently tried out the self-hosted version of the [Umami analytics](https://umami.is/) (v2 specifically). It is a breath of fresh air for anyone used to Google Analytics. Features like individual user session drill-downs and other context related explorations are super simple and straight forward.

Here are my notes on the implementation details and reasons for why I eventually decided to not use it:

1. It relies on `data` attributes on the script tag for [passing the configuration](https://v2.umami.is/docs/tracker-configuration) (script ID, delayed loading, etc.) instead of using a global array collector like `window.dataLayer = []` for configuration and impression/event context ([see source code](https://github.com/umami-software/umami/blob/860e6390f14e7572b27d3ea1230258cff8c9bc96/src/tracker/index.js#L22-L31)). This complicates the setup and will not be flexible in the long-run (can’t inline the tracker JS, values can be only strings).
2. You can’t attach additional context or meta data about the initial page view event ([view source code](https://github.com/umami-software/umami/blob/860e6390f14e7572b27d3ea1230258cff8c9bc96/src/tracker/index.js#L185-L199)). The only option is to completely disable the default impression tracking (which can only be done using the `data-auto-track="false"` attribute and then configure a custom one.
3. [Tracking outbound link clicks](https://v2.umami.is/docs/track-outbound-links) is really complicated — you have to add ```data-umami-event` attribute to all external links to use the built-in tracking ([source code](https://github.com/umami-software/umami/blob/860e6390f14e7572b27d3ea1230258cff8c9bc96/src/tracker/index.js#L113-L139)) or implement a custom solution that captures all link events, accounts for all the modifier logic (new tab, mouse up) and sends a custom event.