Skip to content

Releases: apideck-libraries/agent-analytics

v0.9.0

26 Apr 20:54
f786ef7

Choose a tag to compare

What's Changed

  • fix(ci): explicitly dispatch publish.yml after creating release by @Gdewilde in #10
  • feat: add captureGeo opt-in for region/city/lat/lng/timezone by @Gdewilde in #11

Full Changelog: v0.8.0...v0.9.0

v0.8.0

26 Apr 17:27
415573d

Choose a tag to compare

What's Changed

  • feat: headless detection + Peec-compatible request fields (0.8.0) by @Gdewilde in #9

Full Changelog: v0.7.0...v0.8.0

v0.7.0

21 Apr 10:14
fbf9298

Choose a tag to compare

What's Changed

  • feat: detect headless browsers via missing headers (Playwright/Puppeteer) by @Gdewilde in #8

Full Changelog: v0.6.0...v0.7.0

v0.6.0

21 Apr 04:28
3dbeeb7

Choose a tag to compare

What's Changed

  • feat: add skipBrowsers option by @Gdewilde in #6
  • feat: add SEO, monitoring, social, and scraper bot patterns by @Gdewilde in #7

Full Changelog: v0.5.0...v0.6.0

v0.5.0

20 Apr 23:09
133390d

Choose a tag to compare

What's Changed

  • feat!: rename default event from doc_view to agent_visit by @Gdewilde in #5

Full Changelog: v0.4.0...v0.5.0

v0.4.0

20 Apr 22:24
4e6a6bb

Choose a tag to compare

What's Changed

  • feat!: default onlyBots to false so coding-agent traffic is captured (v0.4.0) by @Gdewilde in #4

Full Changelog: v0.3.0...v0.4.0

v0.3.0 — rename trackDocView → trackVisit

19 Apr 08:43
4ae9781

Choose a tag to compare

Breaking change

  • trackDocViewtrackVisit
  • TrackDocViewOptionsTrackVisitOptions

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

19 Apr 08:30

Choose a tag to compare

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 covering axios/, 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
  • parseBotName now 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.

v0.1.1

19 Apr 07:49

Choose a tag to compare