Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting custom data on autotracked pageviews via data attribute on script element #2436

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ewen-lbh
Copy link

@ewen-lbh ewen-lbh commented Dec 16, 2023

This would allow setting custom data, like Plausible allows with what they call "Custom Properties".

This is very useful to track how much people are on e.g. a version, how much people use the dark theme, how much pageviews are from logged-in users, etc.

An example of what it looks like in the dashboard:

image

Copy link

vercel bot commented Dec 16, 2023

@ewen-lbh is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

ewen-lbh

This comment was marked as spam.

@ewen-lbh
Copy link
Author

I added a way to show those custom fields on a website's dashboard. I also excluded pageview custom data from the custom data tab, since it doesn't make much sense and would pollute that tab with lots of events.

For now you can add these custom data tables on the dashboard via the URL: ?fields=comma,separated,field,of,event-keys

I'll add a selector in the UI but it requires much more changes

ewen-lbh added a commit to inp-net/churros that referenced this pull request Dec 17, 2023
@timomayer
Copy link

very cool feature, will this be merged soon?

@ewen-lbh
Copy link
Author

@timomayer if you want to use it right away, I've been using my fork in production for a few weeks now with no issues.

The annoying thing is that there's nothing in the UI yet to actually choose what custom properties to show, you have to pass them via the query parameter.

And also there are some places where you would expect custom properties to show up (e.g. on reports, etc.) but they only appear on the dashboard for now, and you also can't filter by a custom property's value. It's rudimentary but this is still better than Plausible, that outright denies access to this feature on self-hosted instances.

@ewen-lbh ewen-lbh force-pushed the custom-data-on-pageview branch 2 times, most recently from 3aebe92 to 88ba523 Compare March 30, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants