shadow. Open the section that matches what you’re seeing.
No hits are appearing in Agent Analytics
No hits are appearing in Agent Analytics
Confirm the middleware is deployed
middleware isn’t listed after a deploy, your middleware.ts file may not be at the root of your Next.js project, or the deployment that included it hasn’t finished. Redeploy and check again.Confirm AEN_EDGE_TOKEN is set in Vercel
.env file. Go to Vercel → your project → Settings → Environment Variables and confirm AEN_EDGE_TOKEN is present and non-empty. If it’s missing or empty, the middleware lets every request through and records nothing.Trigger a real answer-engine crawler
Know which visits are not recorded
Verification does not decide whether a hit is counted
IP_VERIFIED) and unverified ones as Unverified (UA_ONLY). Verification only decides whether the optimized version is served — not whether the hit is counted.Check your middleware matcher
_next/, api/, and favicon.ico. If the URL you tested falls outside the matcher’s scope, the middleware never runs for it.A page isn't being served the optimized version
A page isn't being served the optimized version
Confirm the serve mode is default
shadow mode: it records visits but always delivers your normal page. To serve the optimized version, switch to default and redeploy. With the copy-paste file, change the constant:AEN_SERVE_MODE=default in your environment variables. See Serve modes.Confirm the crawler was verified
IP_VERIFIED) can receive the optimized version. An Unverified visit (UA_ONLY) — the crawler was recognised but not confirmed — always receives your normal page, even in default mode. Check the Verified column of Recent activity in Agent Analytics.Check the crawler's purpose
USER_TRIGGERED or RETRIEVAL (User-triggered or Search / retrieval in Agent Analytics). Crawlers with other purposes, such as training crawlers, get your normal page. Why they came shows how many visits came for each purpose.Check that the page has a fresh optimized version
Middleware isn't running — everything passes through
Middleware isn't running — everything passes through
Verify the file name and location
middleware.ts (or middleware.js) and placed at the root of your project — the same directory as package.json. Placing it inside src/, app/, pages/, or any other subdirectory makes Next.js ignore it silently.Confirm you're deployed on Vercel
Check that AEN_EDGE_TOKEN is non-empty
AEN_EDGE_TOKEN is empty or undefined, the middleware does nothing: no detection, no recording, no serving. Confirm the variable is set in Vercel and that you redeployed after adding it.Worried about SEO or search ranking impact
Worried about SEO or search ranking impact
Search bots always get your normal page
Why this matters for AI Overviews
Same content, different format
Optimized version looks out of date after editing a page
Optimized version looks out of date after editing a page
Use the Regenerate action
How out-of-date versions behave
No redeploy needed