-
-
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
Monthly time on page number is incorrect #4429
Comments
Hi everyone, I would like to give a hand! I'm taking a look at the code and I can't run the project on my machine, is there any docs with the instructions? Thanks! |
Ou thanks!!! |
Hi @soerenreinert after taking a look to the code, it looks like the It makes sense then that you have 44 seconds in your page for one day and 6m40s in a month. If some of the maintainers can confirm my hypothesis would be great! |
Right now "Time on Page" is neither an average nor a sum. It's something like SELECT
pathname,
sum(duration)/countIf(transition) -- <- time_on_page
FROM (
SELECT
pathname,
next_pathname != pathname AS transition,
sum(next_timestamp - timestamp) AS duration
FROM (
SELECT
leadInFrame(timestamp) OVER event_horizon AS next_timestamp,
leadInFrame(pathname) OVER event_horizon AS next_pathname,
timestamp,
pathname,
session_id
FROM events_v2 SAMPLE 20000000
WHERE -- {...site and date range filter...}
WINDOW event_horizon AS (
PARTITION BY session_id
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING
)
)
WHERE next_timestamp != 0 AND -- {...some page filter...}
GROUP BY pathname, next_pathname, session_id
)
GROUP BY pathname There are plans to improve it. |
Thanks for reporting this @soerenreinert! And thanks @pmareke for your investigation! There are currently some known issues around the @soerenreinert, I'll be happy to take a closer look at this with specific data if you could please reach out to us at [email protected] and let us know the name of your site in Plausible. |
I'll close this thread for now as it currently works as expected. the time on page issue itself has its own thread where we'll track and post the progress: #2161 |
Past Issues Searched
Issue is a Bug Report
Using official Plausible Cloud hosting or self-hosting?
Plausible Cloud from plausible.io
Describe the bug
We have a page that has time on page values for only 3 days in July 2024 (44s, 1m41s, and 2m11s). However, for the monthly view of July 2024 the time on page in the dashboard shows 6m40s. Other pages have the same issue.
Expected behavior
The average time on page for July 2024 should be between 1-2mins, and can't be 6m40s.
Screenshots
For example July 2:
Monthly view July 2024:
Environment
The text was updated successfully, but these errors were encountered: