Middleware

recordHumans

For sites without JavaScript. Counts every request, including browsers.

When to use it

Static sites, Gemini-generated HTML, or anything that never ships v5.js. Pass recordHumans: true and the middleware records every UA that hits the matcher.

middleware.ts
export const middleware = vector5({
  endpoint: 'https://analytics.example.com/api/hit',
  domain: 'example.com',
  recordHumans: true,
})

Do not double-count

Something off? Open an issue · Edit on GitHub