DEV Community

Marco
Marco

Posted on • Originally published at blog.disane.dev on

Hide your own page views in Umami

Hide your own page views in Umami

Some of you will no doubt be familiar with Google Analytics or Matomo(formerly Piwik). They all have one thing in common: they collect data about users.

These statistics are very useful if you want to view the behavior of users on your own site and improve your site accordingly. You can no longer do without them if you want to understand your target group. Of course, you don't want to track your own page views.

Umami has set itself the goal of breaking the dependency on cloud solutions and wants to be a self-hosted alternative. You can find out exactly how this works with Umami and how to set up Umami in my article here.

Umami tracks my own views ❓

I also had to sadly experience that Umami also tracks my own views and thus falsifies the statistics, sometimes significantly. This is stupid, nobody wants it and nobody likes it.

Unfortunately, there is hardly any documentation on this and I first tried to dynamically add the tracking script using the referer information in the JavaScript. But that's code that needs to be maintained (albeit not much). I don't want that.

Hide your own page views in Umami

Unfortunately, the documentation is quite weak in this respect and didn't offer anything you might need.

The solution 💡

But after hours of searching in various forums and a lot of research, a GitHub issue appeared where the supposed solution was described:

[

[Feature Request] Ignore visits based on hostname - Issue #1151 - umami-software/umami

I use a DynDNS pointing to my IP at home. By resolving this hostname Umami could get my IP and ignore my visits. Would such a feature be appreciated? I would be able to contribute the code.

Hide your own page views in UmamiGitHubumami-software

Hide your own page views in Umami
](https://github.com/umami-software/umami/issues/1151?ref=blog.disane.dev#issuecomment-1127151876)

The solution is simple, but not intuitive. Simply set the entry umami.disabled with the value true in the localStorage in the browser (for the website) and Umami will no longer be tracked in the browser.

Top comments (0)