tinybirdco / web-analytics-starter-kit

Tinybird Web Analytics Starter Kit
https://tinybird.co/starter-kits/web-analytics
MIT License
350 stars 36 forks source link

[Bug] The visits reported in `top_devices` and `top_browsers` endpoints may not be right #90

Closed alejandromav closed 1 month ago

alejandromav commented 1 month ago

Module

Tinybird Data Project

Describe the Bug

There’s an edged case in which we wouldn’t count some sessions. If you leave the website open in a tab overnight, and click on an internal link the next day (or after the session expires, 30 minutes), the new hit will have origin = same page, and then not being taken into account.

This happens since analytics_sources_mv only collects data where the source isn’t the current domain.

Expected Behavior

Count all sessions, including internal navigation, after the session expires. So the top_devices and top_browsers metrics are accurate.

To Reproduce

Leave a tab open for more than 30 minutes, and then click an internal link. A new session id will be generated, but the session won't be taken into account in top_devices and top_browsers endpoints since the origin is the same domain.

Details

No response


Thanks to @ErisDS for reporting 🙏