Capture AI referral visits server-side with edge middleware
Edge middleware 0.13.0 records AI referral visits alongside bots, checks whether a CDN caches your pages, and supports keyless Vercel OIDC authentication.
@devtune/ai-traffic 0.13.0 captures AI-referred visits server-side alongside AI crawlers and answer fetchers, reading AI referrer hosts and campaign tags directly from your middleware without adding a browser script.
When your app sits behind a CDN such as Cloudflare, CloudFront or Fastly, DevTune checks the host daily to see whether pages pass through to your origin or are served from cache. Days on uncached CDN hosts count as measured; cached or uncertain hosts show as observed counts unless the browser snippet also covers them. Your agents can inspect per-host referral coverage over GET /api/v2/projects/{projectId}/traffic/referral-hosts and devtune_get_traffic_referral_hosts.
For Vercel deployments running @devtune/ai-traffic 0.11.0 or later, project admins on plans with AI Traffic Events can also link a Vercel team and project ID in AI Traffic settings to send middleware traffic with Vercel's deployment OIDC token and a project ID, with no ingest key to manage and an opt-in switch for preview deployments. Read the edge middleware AI referral visits and Vercel OIDC docs.