@kody/fathom-analytics
Read Fathom Analytics site stats, aggregation reports, and current visitors.
README.md
55 lines · 2.1 KB · Markdown@kody/fathom-analytics
Intent
Give agents a simple, documented way to read Fathom Analytics data — site stats, ad-hoc aggregation reports, current visitors, and briefing-ready traffic summaries — without hand-writing authenticated fetch calls each time.
What it does
- Verify API access and list readable sites (
smokeTest,listSites) - Pull traffic numbers for a site: totals, top pages, top referrers
(
getSiteTrafficSummary) - Run flexible aggregation reports over pageviews or custom events
(
aggregate) - Check who is on a site right now (
getCurrentVisitors) - Reach any other Fathom endpoint through the guarded raw
requesthelper
Prerequisites / setup
- Create an API token at https://app.usefathom.com/api
- Save it as a user secret named
FATHOM_ANALYTICS_API_TOKEN(do not paste the value in chat):
- Approve host
api.usefathom.comin the account secrets UI - Agents: see
AGENTS.mdfor import paths, smoke checks, and call-cost notes
Every API request counts as one pageview against the Fathom plan. Keep call
counts low (getSiteTrafficSummary = 3 requests, smokeTest = 2). Free-tier
rate limits are about 600 requests/hour and 5 concurrent.
This package deliberately ships no mutation helpers (create/update/delete
sites, events, milestones). Use the raw request helper only when you
explicitly ask for a write.
Done when
FATHOM_ANALYTICS_API_TOKENis saved andapi.usefathom.comis approved- Smoke test returns token metadata plus a site list
- Traffic summaries and aggregations return expected windows for a known site
Branding
The community icon is the official Fathom Analytics mark, used with explicit permission from Fathom co-founder Jack Ellis: https://x.com/JackEllis/status/2081959336176185404 ("Yes you can! :D", 2026-07-28). Fathom Analytics is a product of Conva Ventures Inc.; this package is not affiliated with or endorsed by them.