umami icon indicating copy to clipboard operation
umami copied to clipboard

Filters by hostname. Why not?

Open klawdyo opened this issue 10 months ago • 8 comments

Describe the feature or enhancement

Hello,

First and foremost, I want to commend you on the incredible work you’ve done with the Umami project. The simplicity and efficiency of the tool are truly noteworthy.

However, I noticed that it’s currently not possible to search for statistics based on the hostname. This feature is crucial for me because I manage a system that spans multiple subdomains, and I’d like to centralize these statistics.

Could you please explain why this functionality isn’t available? It would be great if we could filter data by hostname.

Thank you in advance for your attention!

klawdyo avatar Apr 24 '24 15:04 klawdyo

We already store hostname in the session table so it wouldn't be too hard to implement. Were you looking for hostname as its own metric card and filter? Users that don't use subdomain would just see a single record like umami.is which would be pretty useless. I guess we can make it configurable where the default would be to disable it.

franciscao633 avatar Apr 26 '24 03:04 franciscao633

You can implement this filter only in API. It would be an advanced option.

klawdyo avatar Apr 26 '24 10:04 klawdyo

I actually already implemented this feature in https://github.com/umami-software/umami/pull/2689, I just need someone to review my code

giuseongit avatar Apr 29 '24 08:04 giuseongit

The only thing that is missing is the ability to make it configurable, but for that I'd like some help since I've never worked with next.js

giuseongit avatar Apr 29 '24 08:04 giuseongit

One more thing. In this example: one website managing multiple subdomains.

The "open in new tab" button link displayed in this list is wrong image

  • I think the hostname used in this list should be the one in the session, not the one in the website registration.
  • I also think the page icon could be displayed in this list. In cases where they are the same "hostname", nothing would change, but it would look better with the pages' favicon. But in the case of multiple sub-domains, it would help a lot. Example, like referrers icons: image All other lists on the page show the icon. It would be more standardized.

klawdyo avatar Apr 29 '24 14:04 klawdyo

@giuseongit Thanks well take a look. I think were leaning towards just an API change, but if adding a configurable host card makes sense we'll implement.

@klawdyo adding a bug tag. page links should work with subdomains. Thanks for reporting.

franciscao633 avatar Apr 29 '24 16:04 franciscao633

@giuseongit Thanks well take a look. I think were leaning towards just an API change, but if adding a configurable host card makes sense we'll implement.

I think if have many hostnames, make sense show them. Maybe this checking can be better than a config.

@klawdyo adding a bug tag. page links should work with subdomains. Thanks for reporting.

Just remember group pages by hostnames on SQL, because some pages are common between them. Example: Screenshot_20240429-140301.png

  • blue are specific by hostnames
  • yellow are common at all

So "/", for example, should be displayed one time for each hostname.

klawdyo avatar Apr 29 '24 17:04 klawdyo

bump - wish this feature was added and integrated just like refers.

snaildos avatar May 03 '24 20:05 snaildos

I second this. A card that shows the hostnames and a hostname filter while reporting would be really useful for applications using a lot of subdomains.

rishabhAjay avatar May 21 '24 16:05 rishabhAjay

Filtering is now available in v2.12.0. The issue with links and configuration will have to be address in the future.

mikecao avatar Jun 21 '24 04:06 mikecao