-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Average Scroll Depth Metric: handle missing data better #4889
Conversation
|
@@ -0,0 +1,18 @@ | |||
defmodule Plausible.DataMigration.MissingScrollDepth do |
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.
Q: Why is this a data migration not a normal one? Do we want to maintain it long-term?
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.
I just figured it's the preferred way of doing it since are no schema changes involved. When included in the normal migration pipeline, it would run every time when running migrations from scratch. Thought that would be unnecessary.
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.
Do we want to maintain it long-term?
Nope - we could also just run Plausible.DataMigration.MissingScrollDepth.run()
in the remote shell and delete this file later on.
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.
Note we could also just run the same sql directly in clickhouse, but will leave it up to you.
Changes
UInt8
) rather than 0 for pageleave eventsReasoning:
A scroll depth of 0 currently represents a missing value, but it can also be a valid scroll depth in case of extremely short viewports and long documents. Also, 0's are currently counted towards average which we don't want to do in case of missing values
Tests
Changelog
Documentation
Dark mode