-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(web-analytics): Allow customers to compare against a different period #26820
base: master
Are you sure you want to change the base?
feat(web-analytics): Allow customers to compare against a different period #26820
Conversation
@@ -882,6 +882,7 @@ export const webAnalyticsLogic = kea<webAnalyticsLogicType>([ | |||
kind: NodeKind.WebExternalClicksTableQuery, | |||
properties: webAnalyticsFilters, | |||
dateRange, | |||
compareFilter, // NOTE: Backend is not using this yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robbie-c Thoughts on whether this is actually helpful? Does it make sense to compare outbound link clicks? The backend doesn't compare it at all, it's always just current data
It's not hard to implement, but I'm trying to get a feeling here on how this could be helpful. I think it is, but I wanna hear from you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think it is, but fine if we don't include it in this PR
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
…eriod Right now, we'd always compare our data against the last period, i.e. if we're looking at the data from the last 14 days, then you'd always compare it against the previous 14 days. This is not always ideal, as someone might want to compare against numbers from the same time last year. We've added the comparator component in a previous commit (hidden behind a FF) and we're now actually using that data in the backend.
Use same methods as we're using on `stats_table` to calculate previous metrics. We've extracted this up to `web_analytics_query_runner`
7164e68
to
fd09fea
Compare
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come on buddy, why do you keep disappearing 😮💨
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
3413f94
to
18ca9a9
Compare
Changes
Right now, we'd always compare our data against the last period, i.e. if we're looking at the data from the last 14 days, then you'd always compare it against the previous 14 days.
This is not always ideal, as someone might want to compare against numbers from the same time last year.
We've added the comparator component in a previous commit (hidden behind a FF) and we're now actually using that data in the backend.
Does this work well for both Cloud and self-hosted?
Yep
How did you test this code?