Releases: apideck-libraries/agent-analytics
v0.9.0
v0.8.0
What's Changed
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
Full Changelog: v0.6.0...v0.7.0
v0.6.0
v0.5.0
What's Changed
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's Changed
Full Changelog: v0.3.0...v0.4.0
v0.3.0 — rename trackDocView → trackVisit
Breaking change
trackDocView→trackVisitTrackDocViewOptions→TrackVisitOptions
The old name implied this library is only useful for docs sites. It isn't — the v0.2.0 coding-agent classification tier plus marketing-site / blog / landing-page use cases made that framing too narrow. Migration is a global find-and-replace on both identifiers.
The default event name stays doc_view (it's configurable via eventName — changing the default would break existing PostHog dashboards that filter on it).
Why now (no deprecation cycle)
No production deployment depends on v0.2.0 yet — clean break is cheaper than carrying an alias to v1.0.
Migration
- import { trackDocView } from '@apideck/agent-analytics'
+ import { trackVisit } from '@apideck/agent-analytics'
- void trackDocView(req, { analytics })
+ void trackVisit(req, { analytics })- import type { TrackDocViewOptions } from '@apideck/agent-analytics'
+ import type { TrackVisitOptions } from '@apideck/agent-analytics'No other API changes. is_ai_bot, bot_name, ua_category, coding_agent_hint, and all other event properties are unchanged.
v0.2.0 — coding-agent classification
Adds a second detection tier for coding-agent traffic (Claude Code, Cline, Cursor, Windsurf, VS Code, Junie) that previously slipped past AI_BOT_PATTERN because those tools use generic HTTP library UAs instead of identifying themselves.
What's new
HTTP_CLIENT_PATTERN— regex coveringaxios/,curl/,got,colly,Electron/,node-fetch/,python-requests/,Go-http-client/,okhttp/,aiohttp/,Deno/classifyAgent(ua)— one-stop classifier returning{ kind, label, isAiBot, codingAgentHint }isHttpClient(ua)— boolean helper- New event properties on every captured
doc_view:ua_category:'declared-crawler' | 'coding-agent-hint' | 'browser' | 'other'coding_agent_hint: boolean
parseBotNamenow returns'curl' | 'axios' | 'got' | 'colly' | 'Electron' | ...for HTTP-library UAs
Design note
is_ai_bot stays strict — only true for branded AI crawlers. The loose coding_agent_hint is a separate dimension because curl/axios/got are also legitimate server-to-server traffic. Consumers who want the wider net filter by coding_agent_hint: true; everyone else's existing is_ai_bot segmentation is unaffected.
Credit
Coding-agent signatures catalogued by Addy Osmani.
Can't be caught at the UA layer
Aider and OpenCode use Playwright-driven full browser UAs — indistinguishable from real browsers. Use JA4 fingerprints via Vercel Log Drains or request-shape heuristics if you need to catch those.