Repository navigation
Showcase: fix the traffic chart (bot filter) and show total engaged hours - #304
Merged
Merged
Conversation
…ngaged hours The /api/traffic bot filter only caught 0-second homepage sessions, so a bot that loaded /showcase/ ~11,000 times on Nov 20-22 (0.4 engaged hours total) counted as visitors and squashed the visitors-per-day chart. Sessions whose views all had 0 engaged seconds are now dropped on any page when they're a first visit or have no referrer. Saved day summaries carry a version and are redone (4 a request, newest first) so past days pick up the new rule. The avg engaged time tile becomes total engaged hours. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZY4Ga2jzFB4HXTkDdJZCT
✅ Deploy Preview for ascoding11 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Deploying ascoding11-github-io with
|
| Latest commit: |
4dbd251
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a774cb8a.ascoding11-github-io.pages.dev |
| Branch Preview URL: | https://showcase-traffic-fix.ascoding11-github-io.pages.dev |
✅ Deploy Preview for cosmic-dasik-e73c56 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/showcase/): a bot loaded the showcase page ~11,000 times on Nov 20–22 (about 0.4 engaged hours between all of them, ~94% "mobile")./api/trafficonly filtered 0-second homepage bot sessions, so these counted as visitors: the daily chart peaked at 6,803 and every normal ~100-a-day day flattened into the floor. The tiles were inflated too (11.6k visitors, 94% on a phone) and Showcase topped "Top pages".functions/api/traffic.js(functions/change): a session whose views all had 0 engaged seconds is dropped on any page if it's a first visit or has no referrer. Real visitors who stay 5+ seconds always log engaged time, so they're unaffected; a brand-new visitor who leaves in under 5 seconds is no longer counted.traffic_dayssummaries now carryver: 2. Old ones are redone up to 4 per request, newest first, and_latestisn't saved until all are done. One-time cost: re-reading the last 29 days of pageviews (~28k Firestore reads, spread over a few requests), within the free 50k/day.engagedHours, already in the API and the fallback snapshot).Generated by Claude Code