Add time zone parameter to Stats API endpoints #4365
jon-mercer
started this conversation in
Anything Else
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, Plausible team!
I have a use-case where I want to present page view statistics in different time zones. Our company does marketing on social media for live events (concerts, classes, special events, etc). These events are produced by our partners, and we want to show them how much traffic we are driving to their event's listing on our site. We want to present this information to them in their own time zone, so that it does not lead to confusion (especially when looking at time series data around the current time).
To meet our needs, I have forked Plausible analytics and added in an optional parameter to the timeseries, aggregate, and breakdown endpoints for what time zone data should be presented and how date boundaries should be calculated. This is a pretty small, self-contained feature which doesn't involve any changes to the frontend; just the API. When it comes to actually presenting this data to our partners, we are building dashboards into our products which will use this Plausible API.
We have this fork up and running (self-hosted) and we can continue to use it, but I'd like to contribute this change back to the primary repository since others may find it useful. I saw in
CONTRIBUTING.md
that I should start by opening a discussion here, so here I am!Beta Was this translation helpful? Give feedback.
All reactions