feat/dev: Add Cloudflare traffic reports - #1890
Open
marcleblanc2 wants to merge 12 commits into
Open
Conversation
Counts likely-human HTML page views for /docs, /changelog and /blog over the last 90 days via Cloudflare's GraphQL Analytics API, excluding Hetzner and China, and writes reports to logs/ sorted by path and by request count. Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
… redirect and error reports Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
…orted reports Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08479-a4c8-72ad-8f31-fe7ecc43bf34 Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
marked this pull request as ready for review
September 9, 2026 10:29
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.
Adds
viewership-metrics/page-views-report.mjs, a dependency-free Node script that pulls 90 days of Cloudflare analytics for/docs,/changelogand/blogon sourcegraph.com and writes Markdown reports toviewership-metrics/reports/(gitignored). Seeviewership-metrics/README.md.What it reports
redirect-rules.md: hits per rule insrc/data/redirects.ts, flagging rules shadowed by an earlier duplicate source and redirect chains (a destination that is itself another rule's source)Filters
Bot Management
likely_human, excluding ASNHetzner Online GmbHand countryCN. Skips/_next, static assets, scanner probe paths and trailing-slash redirects.Findings from the first 90-day run
precise_code_navigationrules alone send ~5,500 visitors through 2 or 3 redirects/changelog/.api/changelog.v1.ChangelogService/ListReleasePostsreturned 1,880 5xx/blog/feed.atom(3,410) and/blog/feed.xml(1,000) 404 while/blog/rss.xmlredirects 21,790 times/docs/.zshrccount as viewsTest
Amp threads