Skip to content

feat: add bot traffic filtering and engaged sessions metric#3073

Open
MillenniumFalconMechanic wants to merge 2 commits into
mainfrom
mim/3070-bot-filtering
Open

feat: add bot traffic filtering and engaged sessions metric#3073
MillenniumFalconMechanic wants to merge 2 commits into
mainfrom
mim/3070-bot-filtering

Conversation

@MillenniumFalconMechanic
Copy link
Copy Markdown
Contributor

Ticket

Closes #3070

Summary

  • Update analytics library to main (feat: add bot traffic filtering and engaged sessions metric to static analytics data-browser#4838 merged), replacing feature branch reference
  • Regenerate analytics site with bot traffic filtering and engaged sessions metric:
    • Suspicious page path filtering: removes bot-like paths (/robots.txt, /), /index.html, broken markdown links, /openapi.json) from the top pages table — 7 paths / 11 pageviews filtered
    • Engaged Sessions: replaces Total Sessions as the displayed metric (4,340 vs 7,293 — ~40% reduction, filtering out non-engaged bot/bounce sessions)

Test plan

  • Run python generate_static_site.py and verify site generates successfully
  • Verify "Engaged Sessions" stat card replaces "User Sessions"
  • Verify suspicious page paths (e.g., /robots.txt, /)) are absent from Top Pages table
  • Preview locally with cd site && python -m http.server 8080

🤖 Generated with Claude Code

Update analytics library to main (bot-filtering merged). Regenerate site
with suspicious page path filtering and engaged sessions replacing total
sessions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the static analytics site output to reduce bot noise and align displayed session metrics with GA4 “engaged sessions”, along with bumping the analytics generator dependency to the merged upstream library.

Changes:

  • Switch the “sessions” stat card to display “Engaged Sessions” using GA4’s engagedSessions (with fallback to sessions).
  • Regenerate static analytics JSON outputs with suspicious/bot-like page paths removed from top pages.
  • Update analytics generator dependency to use DataBiosphere/data-browser main.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
analytics/site/index.html Updates stat cards, table rendering behavior, and event detail table structure.
analytics/site/data/pageviews.json Regenerated top pages data with bot/suspicious paths removed.
analytics/site/data/meta.json Adds engaged_sessions metadata and updates generation timestamp.
analytics/site/data/event_charts.json Regenerated event chart series data.
analytics/site/data/event_atlas_downloads_detail.json Regenerated downloads detail data (now aggregated differently).
analytics/site/data/custom_events.json Regenerated custom event summary counts.
analytics/requirements.txt Updates analytics library source reference to data-browser main.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread analytics/site/index.html
Comment thread analytics/site/index.html
Comment thread analytics/requirements.txt Outdated
Comment thread analytics/site/index.html Outdated
The atlas library branch (mim/3069-atlas-analytics-library) has been
rebased onto data-browser main, combining bot-filtering/engaged sessions
with click_url support, collapsible tables, and per-card chart titles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add bot traffic filtering and engaged sessions metric to static analytics

2 participants