Open Settings → Integrations → Vercel in Gauge — you’ll copy the Endpoint URL and secret from it. The rest happens in the Vercel dashboard:
In your Vercel team, open Settings → Drains and click Create Drain.
Pick Logs as the data source.
Select the projects you want to track. Under source types, enable Static Files, Function, and Edge Function — all three together capture every incoming HTTP request. Under environments, enable Production.
For the destination, choose Custom endpoint and paste the Endpoint URL from the Gauge page. Pick either JSON or NDJSON as the format — Gauge accepts both.
Still on the destination step, click Add header and create a header named Authorization with the value Bearer <your-secret> — click Show on the Gauge page to reveal the secret.
Save the drain. Vercel runs a connectivity check, and traffic starts flowing within a few minutes. In Gauge, the card shows a Receiving events badge and a View AI Traffic button once events land.
Without the Authorization header, Gauge rejects every event with a 403 and you’ll see no traffic. The value must start with Bearer followed by your secret.
Gauge creates the Worker, uploads the secret, and attaches the routes. It needs a scoped Cloudflare API token:
Click Connect Cloudflare.
Click Create the token on Cloudflare. This opens Cloudflare’s Create Custom Token form pre-filled with the three permissions Gauge needs: Account.Workers Scripts: Edit, Zone.Workers Routes: Edit, and Zone.Zone: Read.
In Cloudflare, click Continue to summary, then Create Token, and copy the token.
Back in Gauge, paste it into the Paste the token field and click Connect.
If the token can access more than one Cloudflare account, pick one and click Use this account.
The card now shows a Cloudflare connected badge and lists every zone (domain) on your account under Your zones.
Click Enable on a zone. Gauge deploys the Worker with a wildcard route covering the whole zone and forwards every request.To change what gets forwarded, expand the zone with the chevron first. Two settings:Routes — which parts of your site the Worker watches:
Apex (yourdomain.com/*)
WWW subdomain (www.yourdomain.com/*)
Docs subdomain (docs.yourdomain.com/*)
Wildcard (*.yourdomain.com/*) — all subdomains
Add route for a custom pattern, like app.yourdomain.com/*
Traffic to forward:
All requests (recommended) — forward everything; Gauge classifies bots downstream.
Bot requests only — drop human traffic at the edge, forward only known AI crawlers (GPTBot, ClaudeBot, PerplexityBot, etc.). Only use this if your security policy requires it — filtered traffic can’t be backfilled.
Click Enable (or Update if the zone is already running).
The zone badge shows Enabled, no events yet right after deploying, then Receiving events once traffic lands — usually within a minute. If events never arrive, check that the zone’s DNS records are proxied through Cloudflare (orange cloud on). The Worker only sees proxied traffic.
If you’d rather not give Gauge an API token, expand Prefer to set up manually? at the bottom of the Worker tab:
In the Cloudflare dashboard, go to Workers & Pages → Create Application, choose Start with Hello World!, and click Deploy.
Open the new Worker, go to Settings → Variables and Secrets, and add an encrypted Secret named DRAIN_SECRET. For the value, click Show on the Secret row in Gauge, copy it, paste it in, and select Save Version.
Click Edit code, replace the starter contents with the Worker code from the Gauge page (Copy Worker code button), and click Save and deploy.
Go to Settings → Triggers → Routes and add a route matching your zone — for example, *.yourdomain.com/*.
Traffic starts forwarding within a minute. Gauge shows Manual setup detected with per-zone event counts once payloads arrive.
In the Cloudflare dashboard, open your zone and add a Logpush job under Analytics & Logs → Logs.
Select dataset HTTP requests and destination HTTP.
Paste the Destination URL from the Gauge page.
Under Advanced options, add a header named Authorization with the value Bearer <your-secret>.
On the Configure fields step, select ClientRequestUserAgent. Also recommended: EdgeStartTimestamp, ClientRequestPath, ClientRequestHost, EdgeResponseStatus, EdgeResponseBytes, and ClientCountry.
Save the job. Cloudflare sends a test batch, and the badge in Gauge flips to Receiving events within a few minutes.
If ClientRequestUserAgent isn’t selected, the logs arrive without user agents and Gauge can’t detect AI bots.
Use the manual option if you cannot send logs through Cloudflare or Vercel. Open Settings → Integrations → AI Traffic (manual) and click Create endpoint. Gauge gives you a dedicated endpoint URL and bearer secret.Send an HTTPS POST with these headers:
Every object needs timestamp, user_agent, and either url or both host and path. The code block has a copy button so you can use this JSON Schema in your own validation or transformation code.
Gauge accepts timestamps from 1900-01-01T00:00:00Z through 2262-04-11T23:47:16.854775807Z. Events can arrive out of chronological order. Gauge uses the event’s timestamp in AI Traffic rather than the time it receives the request.
Use ?dry_run=1 first. Gauge validates and normalizes the payload without storing it, then returns accepted and rejected counts with sample normalized rows.
No events after Vercel setup — check the Authorization header exists and starts with Bearer , and that Production is enabled under environments.
No events after Cloudflare Worker setup — check the zone’s DNS records are orange-cloud proxied and the route pattern matches your traffic (including the trailing /*).
Manual events are rejected — add ?dry_run=1 to inspect validation errors. Check that every object includes a valid timestamp, a non-empty user_agent, and either url or both host and path.
Traffic stopped after regenerating the secret — update the DRAIN_SECRET in your Worker, or the Authorization header in your Logpush job or Vercel drain, with the new value.
Bots missing from Logpush data — make sure ClientRequestUserAgent is in the job’s field list.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gauge Docs","description":"Gauge Chat measures AI visibility. Gauge Agents measures which developer tools coding agents choose and whether they can use them successfully.","colors":{"primary":"#051b23","light":"#e8ff3f","dark":"#2A6E8D"},"logo":{"light":"https://mintcdn.com/gauge-42561b62/O5gj27o-wX8DVccM/logo/light.svg?fit=max\u0026auto=format\u0026n=O5gj27o-wX8DVccM\u0026q=85\u0026s=6fb77f0aeb3f1d4b0404a3fb65f04c29","dark":"https://mintcdn.com/gauge-42561b62/O5gj27o-wX8DVccM/logo/dark.svg?fit=max\u0026auto=format\u0026n=O5gj27o-wX8DVccM\u0026q=85\u0026s=836ca3f8817c0cd273c2b7b325efad8a"},"favicon":"https://mintcdn.com/gauge-42561b62/O5gj27o-wX8DVccM/logo/gauge-square.svg?fit=max\u0026auto=format\u0026n=O5gj27o-wX8DVccM\u0026q=85\u0026s=775cd8fd4e458bdbe03b36d0cb388c3c","navbar":{"links":[{"href":"/cli","label":"CLI"},{"href":"/gauge-mcp","label":"MCP"},{"href":"/resources/changelog","label":"Changelog"},{"href":"https://app.withgauge.com","label":"Back to Gauge"}]},"footer":{"socials":{"website":"https://withgauge.com"}},"styling":{"eyebrows":"breadcrumbs","latex":true},"markdown":{"instructions":["For API and SDK launches, integration testing, and ongoing coding-agent checks, start with Gauge Agents:","- [Gauge Agents overview](https://docs.withgauge.com/agents/index.md)","- [Gauge Agents quickstart](https://docs.withgauge.com/agents/quickstart.md)","- [Create and inspect an eval](https://docs.withgauge.com/agents/guides/create-an-eval-and-run-an-experiment.md)","- [Agent Experience: diagnose integration failures](https://docs.withgauge.com/agents/concepts/agent-experience.md)","- [Agent Preference: measure product selection](https://docs.withgauge.com/agents/concepts/agent-preference.md)","- [GitHub PR checks](https://docs.withgauge.com/agents/guides/github-pr-checks.md)","For AI search visibility and AEO, start with [Gauge Chat](https://docs.withgauge.com/introduction/welcome.md)."]},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gauge-42561b62","hasAudioNarration":false,"actualSubdomain":"gauge-42561b62","customDomains":["docs.withgauge.com"],"gitSource":{"type":"github","owner":"gauge-sh","repo":"learn-with-gauge","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af269b9c0ea702b5cc3b911","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API reference","count":166},{"language":"default","tag":"Gauge Agents","count":164},{"language":"default","tag":"Endpoints","count":164},{"language":"default","tag":"Gauge Chat","count":78},{"language":"default","tag":"Navigating Gauge","count":17},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"Optimizations","count":15},{"language":"default","tag":"Agent Preference","count":13},{"language":"default","tag":"Runs","count":12},{"language":"default","tag":"Organizations","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700\u0026display=swap');@import url('https://fonts.bunny.net/css?family=switzer:300,400,500,600');*,*::before,*::after{border-radius:0!important}html[data-current-path^=\"/agents/api-reference/\"] [data-component-part=\"code-block-root\"],html[data-current-path^=\"/agents/api-reference/\"] [data-component-part=\"code-block-root\"]::-webkit-scrollbar-thumb{border-radius:0!important}body,p,li,span,a{font-family:'Switzer', 'Arial', sans-serif!important}#content.prose,#content [data-component-part=\"step-content\"]{color:#051b23}.dark #content.prose,.dark #content [data-component-part=\"step-content\"]{color:#d4d4d8}h1,h2,h3,h4,h5,h6,[class*=\"heading\"],[class*=\"title\"],.prose h1,.prose h2,.prose h3{font-family:'DM Sans', 'Arial', sans-serif!important;font-weight:700!important;letter-spacing:-0.02em!important}.bg-primary\\/10.text-primary{background-color:#e8ff3f!important;color:#051b23!important;text-shadow:none!important}.docs-primary-button{background-color:#051b23;color:#ffffff!important}.dark .docs-primary-button{background-color:#e8ff3f;color:#051b23!important}.docs-overview,.docs-overview h1,.docs-overview h2,.docs-overview h3,.docs-overview p,.docs-overview li,.docs-overview td{color:#000000}.dark .docs-overview,.dark .docs-overview h1,.dark .docs-overview h2,.dark .docs-overview h3{color:#ffffff}.dark .docs-overview p,.dark .docs-overview li,.dark .docs-overview td{color:#d4d4d8}.docs-overview p>a,.docs-overview li>a{color:#2563eb!important;text-decoration:underline;text-underline-offset:2px}.dark .docs-overview p>a,.dark .docs-overview li>a{color:#60a5fa!important}.docs-pricing-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1.5rem}.docs-pricing-card{display:flex;flex-direction:column;overflow:hidden;border:1px solid #d1d5db;background:#ffffff;box-shadow:0 16px 40px -32px rgba(5, 27, 35, 0.55)}.docs-pricing-card-body{flex:1;padding:1.75rem}.docs-product-label{display:inline-flex;margin-bottom:1rem;background:#eff3f4;padding:0.4rem 0.7rem;color:#2a5668;font-size:0.75rem;font-weight:600;letter-spacing:0.025em}.docs-pricing-card h3{margin:0;color:#051b23;font-size:1.35rem;line-height:1.25}.docs-pricing-summary{margin-top:0.85rem;color:#4b5563!important;line-height:1.65}.docs-value-highlight{display:flex;align-items:center;gap:0.85rem;margin-top:1.5rem;background:#f8fadf;padding:1rem}.docs-value-highlight strong{flex:none;color:#051b23;font-family:'DM Sans', 'Arial', sans-serif;font-size:1.75rem;line-height:1}.docs-value-highlight span{color:#35454b;font-size:0.85rem;line-height:1.35}.docs-metric-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1rem;margin-top:1.5rem}.docs-metric-grid div{display:flex;flex-direction:column;gap:0.2rem}.docs-metric-grid strong{color:#051b23;font-size:1rem}.docs-metric-grid span{color:#6b7280;font-size:0.78rem;line-height:1.35}.docs-pricing-card-footer{display:flex;flex-direction:column;gap:1rem;border-top:1px solid #e5e7eb;background:#f8fafb;padding:1.5rem 1.75rem}.docs-plan-name{color:#4b5563;font-size:0.78rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em}.docs-price{display:flex;align-items:baseline;gap:0.3rem;margin-top:0.2rem;color:#051b23}.docs-price strong{font-family:'DM Sans', 'Arial', sans-serif;font-size:2rem;letter-spacing:-0.04em}.docs-price span{color:#4b5563;font-size:0.9rem}.docs-pricing-card-footer p{margin:0.25rem 0 0;color:#4b5563!important;font-size:0.85rem;line-height:1.5}.docs-pricing-cta{display:block;background:#e8ff3f;padding:0.75rem 1rem;color:#051b23!important;font-size:0.9rem;font-weight:600;text-align:center;text-decoration:none!important;transition:opacity 150ms ease}.docs-pricing-cta:hover{opacity:0.88}.docs-enterprise-note{font-size:0.78rem!important}.dark .docs-pricing-card{border-color:#3f3f46;background:#18181b;box-shadow:none}.dark .docs-product-label{background:#24333a;color:#c7d9df}.dark .docs-pricing-card h3,.dark .docs-value-highlight strong,.dark .docs-metric-grid strong,.dark .docs-price{color:#ffffff}.dark .docs-pricing-summary,.dark .docs-pricing-card-footer p{color:#d4d4d8!important}.dark .docs-value-highlight{background:#30351d}.dark .docs-value-highlight span,.dark .docs-metric-grid span,.dark .docs-plan-name,.dark .docs-price span{color:#b9c0c3}.dark .docs-pricing-card-footer{border-color:#3f3f46;background:#202024}.dark .docs-pricing-cta{background:#e8ff3f;color:#051b23!important}@media (min-width: 768px){.docs-pricing-grid{row-gap:0}.docs-pricing-card{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0}.docs-pricing-card-footer{display:grid;grid-row:span 3;grid-template-rows:subgrid}}@media (max-width: 767px){.docs-pricing-grid{grid-template-columns:1fr}}html[data-current-path=\"/resources/changelog\"] .update-container{flex-direction:column;gap:1rem;padding:2rem 0;border-top:1px solid #e5e7eb}html[data-current-path=\"/resources/changelog\"] .update-container>div:first-child{position:static;width:100%}html[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-label\"]{background:transparent!important;color:#52616b!important;padding:0;font-size:0.8125rem;text-align:left;justify-content:flex-start}html[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-tag-list\"]{display:none}html[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-content\"]{font-size:1rem;line-height:1.75}html[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-content\"] h2{margin-top:0;font-size:1.375rem;line-height:1.35}html[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-content\"] ul{margin-bottom:0}html[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-content\"] li{margin-top:1rem}html.dark[data-current-path=\"/resources/changelog\"] .update-container{border-color:#30363d}html.dark[data-current-path=\"/resources/changelog\"] [data-component-part=\"update-label\"]{color:#a1a1aa!important}"}],"page":{"pagePath":"help/ai-traffic-setup","slug":"/help/ai-traffic-setup","pageMetadata":{"title":"Configuring AI Traffic","description":"Connect server logs to Gauge to power the AI Traffic page.","href":"/help/ai-traffic-setup"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Connect server logs to Gauge to power the AI Traffic page.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`configuring-ai-traffic`,children:`Configuring AI Traffic`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/navigating/ai-traffic`,children:`AI Traffic`}),` is powered by your server logs. Forward them to Gauge from one of these sources:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Vercel`}),` — requires a Vercel `,_jsx(_components.strong,{children:`Pro or Enterprise`}),` plan. Use this if you host on Vercel without Cloudflare in front.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cloudflare`}),` — works on any Cloudflare plan, including Free. Use this if your site is behind Cloudflare, even if the origin is hosted elsewhere.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manual`}),` — send JSON request logs from another CDN, reverse proxy, load balancer, or application.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`All three options live under `,_jsx(_components.strong,{children:`Settings → Integrations`}),`. You can connect more than one.`]}),`\n`,_jsx(Heading,{level:`2`,id:`your-drain-url-and-secret`,children:`Your Drain URL and Secret`}),`\n`,_jsx(_components.p,{children:`Every setup path uses two values shown on the integration page:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Destination URL`}),` (called `,_jsx(_components.strong,{children:`Endpoint URL`}),` on the Vercel card) — where your host sends logs. Click `,_jsx(_components.strong,{children:`Copy`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Secret`}),` — authenticates those logs. Click `,_jsx(_components.strong,{children:`Show`}),`, then `,_jsx(_components.strong,{children:`Copy`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`vercel-setup`,children:`Vercel Setup`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Settings → Integrations → Vercel`}),` in Gauge — you’ll copy the Endpoint URL and secret from it. The rest happens in the Vercel dashboard:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In your Vercel team, open `,_jsx(_components.strong,{children:`Settings → Drains`}),` and click `,_jsx(_components.strong,{children:`Create Drain`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Pick `,_jsx(_components.strong,{children:`Logs`}),` as the data source.`]}),`\n`,_jsxs(_components.li,{children:[`Select the projects you want to track. Under source types, enable `,_jsx(_components.strong,{children:`Static Files`}),`, `,_jsx(_components.strong,{children:`Function`}),`, and `,_jsx(_components.strong,{children:`Edge Function`}),` — all three together capture every incoming HTTP request. Under environments, enable `,_jsx(_components.strong,{children:`Production`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`For the destination, choose `,_jsx(_components.strong,{children:`Custom endpoint`}),` and paste the `,_jsx(_components.strong,{children:`Endpoint URL`}),` from the Gauge page. Pick either `,_jsx(_components.strong,{children:`JSON`}),` or `,_jsx(_components.strong,{children:`NDJSON`}),` as the format — Gauge accepts both.`]}),`\n`,_jsxs(_components.li,{children:[`Still on the destination step, click `,_jsx(_components.strong,{children:`Add header`}),` and create a header named `,_jsx(_components.code,{children:`Authorization`}),` with the value `,_jsx(_components.code,{children:`Bearer \u003cyour-secret>`}),` — click `,_jsx(_components.strong,{children:`Show`}),` on the Gauge page to reveal the secret.`]}),`\n`,_jsxs(_components.li,{children:[`Save the drain. Vercel runs a connectivity check, and traffic starts flowing within a few minutes. In Gauge, the card shows a `,_jsx(_components.strong,{children:`Receiving events`}),` badge and a `,_jsx(_components.strong,{children:`View AI Traffic`}),` button once events land.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Without the `,_jsx(_components.code,{children:`Authorization`}),` header, Gauge rejects every event with a 403 and you’ll see no traffic. The value must start with `,_jsx(_components.code,{children:`Bearer `}),` followed by your secret.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`cloudflare-setup`,children:`Cloudflare Setup`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Settings → Integrations → Cloudflare`}),` and pick a tab:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Worker (any plan)`}),` — Gauge forwards traffic through a small Cloudflare Worker. Right for almost everyone.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Logpush (Enterprise)`}),` — Cloudflare streams logs directly to Gauge. Cloudflare Enterprise only.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`option-1-automatic-worker-setup-recommended`,children:`Option 1: Automatic Worker Setup (Recommended)`}),`\n`,_jsx(_components.p,{children:`Gauge creates the Worker, uploads the secret, and attaches the routes. It needs a scoped Cloudflare API token:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Connect Cloudflare`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create the token on Cloudflare`}),`. This opens Cloudflare’s `,_jsx(_components.strong,{children:`Create Custom Token`}),` form pre-filled with the three permissions Gauge needs: `,_jsx(_components.code,{children:`Account.Workers Scripts: Edit`}),`, `,_jsx(_components.code,{children:`Zone.Workers Routes: Edit`}),`, and `,_jsx(_components.code,{children:`Zone.Zone: Read`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`In Cloudflare, click `,_jsx(_components.strong,{children:`Continue to summary`}),`, then `,_jsx(_components.strong,{children:`Create Token`}),`, and copy the token.`]}),`\n`,_jsxs(_components.li,{children:[`Back in Gauge, paste it into the `,_jsx(_components.strong,{children:`Paste the token`}),` field and click `,_jsx(_components.strong,{children:`Connect`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If the token can access more than one Cloudflare account, pick one and click `,_jsx(_components.strong,{children:`Use this account`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The card now shows a `,_jsx(_components.strong,{children:`Cloudflare connected`}),` badge and lists every zone (domain) on your account under `,_jsx(_components.strong,{children:`Your zones`}),`.`]}),`\n`,_jsx(Heading,{level:`4`,id:`enable-a-zone`,children:`Enable a Zone`}),`\n`,_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Enable`}),` on a zone. Gauge deploys the Worker with a wildcard route covering the whole zone and forwards every request.`]}),`\n`,_jsx(_components.p,{children:`To change what gets forwarded, expand the zone with the chevron first. Two settings:`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Routes`}),` — which parts of your site the Worker watches:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Apex`}),` (`,_jsx(_components.code,{children:`yourdomain.com/*`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`WWW subdomain`}),` (`,_jsx(_components.code,{children:`www.yourdomain.com/*`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Docs subdomain`}),` (`,_jsx(_components.code,{children:`docs.yourdomain.com/*`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Wildcard`}),` (`,_jsx(_components.code,{children:`*.yourdomain.com/*`}),`) — all subdomains`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Add route`}),` for a custom pattern, like `,_jsx(_components.code,{children:`app.yourdomain.com/*`})]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Traffic to forward:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`All requests (recommended)`}),` — forward everything; Gauge classifies bots downstream.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Bot requests only`}),` — drop human traffic at the edge, forward only known AI crawlers (GPTBot, ClaudeBot, PerplexityBot, etc.). Only use this if your security policy requires it — filtered traffic can’t be backfilled.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Enable`}),` (or `,_jsx(_components.strong,{children:`Update`}),` if the zone is already running).`]}),`\n`,_jsx(Heading,{level:`4`,id:`verify`,children:`Verify`}),`\n`,_jsxs(_components.p,{children:[`The zone badge shows `,_jsx(_components.strong,{children:`Enabled, no events yet`}),` right after deploying, then `,_jsx(_components.strong,{children:`Receiving events`}),` once traffic lands — usually within a minute. If events never arrive, check that the zone’s DNS records are proxied through Cloudflare (orange cloud on). The Worker only sees proxied traffic.`]}),`\n`,_jsx(Heading,{level:`3`,id:`option-2-manual-worker-setup`,children:`Option 2: Manual Worker Setup`}),`\n`,_jsxs(_components.p,{children:[`If you’d rather not give Gauge an API token, expand `,_jsx(_components.strong,{children:`Prefer to set up manually?`}),` at the bottom of the Worker tab:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the Cloudflare dashboard, go to `,_jsx(_components.strong,{children:`Workers \u0026 Pages → Create Application`}),`, choose `,_jsx(_components.strong,{children:`Start with Hello World!`}),`, and click `,_jsx(_components.strong,{children:`Deploy`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Open the new Worker, go to `,_jsx(_components.strong,{children:`Settings → Variables and Secrets`}),`, and add an encrypted `,_jsx(_components.strong,{children:`Secret`}),` named `,_jsx(_components.code,{children:`DRAIN_SECRET`}),`. For the value, click `,_jsx(_components.strong,{children:`Show`}),` on the Secret row in Gauge, copy it, paste it in, and select `,_jsx(_components.strong,{children:`Save Version`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Edit code`}),`, replace the starter contents with the Worker code from the Gauge page (`,_jsx(_components.strong,{children:`Copy Worker code`}),` button), and click `,_jsx(_components.strong,{children:`Save and deploy`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`Settings → Triggers → Routes`}),` and add a route matching your zone — for example, `,_jsx(_components.code,{children:`*.yourdomain.com/*`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Traffic starts forwarding within a minute. Gauge shows `,_jsx(_components.strong,{children:`Manual setup detected`}),` with per-zone event counts once payloads arrive.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`option-3-logpush-cloudflare-enterprise`,children:`Option 3: Logpush (Cloudflare Enterprise)`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the Cloudflare dashboard, open your zone and add a `,_jsx(_components.strong,{children:`Logpush job`}),` under `,_jsx(_components.strong,{children:`Analytics \u0026 Logs → Logs`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Select dataset `,_jsx(_components.strong,{children:`HTTP requests`}),` and destination `,_jsx(_components.strong,{children:`HTTP`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Paste the `,_jsx(_components.strong,{children:`Destination URL`}),` from the Gauge page.`]}),`\n`,_jsxs(_components.li,{children:[`Under `,_jsx(_components.strong,{children:`Advanced options`}),`, add a header named `,_jsx(_components.code,{children:`Authorization`}),` with the value `,_jsx(_components.code,{children:`Bearer \u003cyour-secret>`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`On the `,_jsx(_components.strong,{children:`Configure fields`}),` step, select `,_jsx(_components.code,{children:`ClientRequestUserAgent`}),`. Also recommended: `,_jsx(_components.code,{children:`EdgeStartTimestamp`}),`, `,_jsx(_components.code,{children:`ClientRequestPath`}),`, `,_jsx(_components.code,{children:`ClientRequestHost`}),`, `,_jsx(_components.code,{children:`EdgeResponseStatus`}),`, `,_jsx(_components.code,{children:`EdgeResponseBytes`}),`, and `,_jsx(_components.code,{children:`ClientCountry`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Save the job. Cloudflare sends a test batch, and the badge in Gauge flips to `,_jsx(_components.strong,{children:`Receiving events`}),` within a few minutes.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`ClientRequestUserAgent`}),` isn’t selected, the logs arrive without user agents and Gauge can’t detect AI bots.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`manual-setup`,children:`Manual Setup`}),`\n`,_jsxs(_components.p,{children:[`Use the manual option if you cannot send logs through Cloudflare or Vercel. Open `,_jsx(_components.strong,{children:`Settings → Integrations → AI Traffic (manual)`}),` and click `,_jsx(_components.strong,{children:`Create endpoint`}),`. Gauge gives you a dedicated endpoint URL and bearer secret.`]}),`\n`,_jsxs(_components.p,{children:[`Send an HTTPS `,_jsx(_components.code,{children:`POST`}),` with these headers:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Authorization: Bearer \u003csecret>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Content-Type: application/x-ndjson`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The body can be newline-delimited JSON (NDJSON) or a JSON array. Each object represents one request. Gzip-compressed bodies are also accepted.`}),`\n`,_jsx(Heading,{level:`3`,id:`request-schema`,children:`Request Schema`}),`\n`,_jsxs(_components.p,{children:[`Every object needs `,_jsx(_components.code,{children:`timestamp`}),`, `,_jsx(_components.code,{children:`user_agent`}),`, and either `,_jsx(_components.code,{children:`url`}),` or both `,_jsx(_components.code,{children:`host`}),` and `,_jsx(_components.code,{children:`path`}),`. The code block has a copy button so you can use this JSON Schema in your own validation or transformation code.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`55`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`55`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"$schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://json-schema.org/draft/2020-12/schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Gauge AI Traffic request event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ISO 8601 timestamp or Unix epoch in seconds, milliseconds, microseconds, or nanoseconds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minLength\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxLength\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Full request URL, including the host\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"uri\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"host\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minLength\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxLength\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`253`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minLength\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maxLength\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2048`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minimum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maximum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`599`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"bytes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minimum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maximum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9223372036854775807`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Two-letter country code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pattern\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"^[A-Za-z]{2}$\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"client_ip\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"anyOf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"host\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalProperties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Gauge accepts timestamps from `,_jsx(_components.code,{children:`1900-01-01T00:00:00Z`}),` through `,_jsx(_components.code,{children:`2262-04-11T23:47:16.854775807Z`}),`. Events can arrive out of chronological order. Gauge uses the event’s timestamp in AI Traffic rather than the time it receives the request.`]}),`\n`,_jsx(Heading,{level:`3`,id:`send-and-validate-an-event`,children:`Send and Validate an Event`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`?dry_run=1`}),` first. Gauge validates and normalizes the payload without storing it, then returns accepted and rejected counts with sample normalized rows.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://\u003cendpoint-url>?dry_run=1'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003csecret>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/x-ndjson'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"timestamp\":\"2026-08-25T18:30:00Z\",\"user_agent\":\"GPTBot/1.0\",\"url\":\"https://example.com/docs?page=2\",\"status\":200,\"bytes\":1420,\"country\":\"US\"}'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Remove `,_jsx(_components.code,{children:`?dry_run=1`}),` after validation succeeds. AI bot requests appear in Gauge after ingestion completes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`turning-it-off`,children:`Turning It Off`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Vercel:`}),` open `,_jsx(_components.strong,{children:`Settings → Drains`}),` in Vercel, click into the drain, and select `,_jsx(_components.strong,{children:`Delete drain`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cloudflare (automatic):`}),` click `,_jsx(_components.strong,{children:`Disable`}),` on a zone, or `,_jsx(_components.strong,{children:`Disconnect`}),` to drop the API token entirely.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cloudflare (manual or Logpush):`}),` delete the Worker route or Logpush job in the Cloudflare dashboard.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Historical data already in Gauge stays put.`}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No events after Vercel setup`}),` — check the `,_jsx(_components.code,{children:`Authorization`}),` header exists and starts with `,_jsx(_components.code,{children:`Bearer `}),`, and that `,_jsx(_components.strong,{children:`Production`}),` is enabled under environments.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No events after Cloudflare Worker setup`}),` — check the zone’s DNS records are orange-cloud proxied and the route pattern matches your traffic (including the trailing `,_jsx(_components.code,{children:`/*`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manual events are rejected`}),` — add `,_jsx(_components.code,{children:`?dry_run=1`}),` to inspect validation errors. Check that every object includes a valid `,_jsx(_components.code,{children:`timestamp`}),`, a non-empty `,_jsx(_components.code,{children:`user_agent`}),`, and either `,_jsx(_components.code,{children:`url`}),` or both `,_jsx(_components.code,{children:`host`}),` and `,_jsx(_components.code,{children:`path`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Traffic stopped after regenerating the secret`}),` — update the `,_jsx(_components.code,{children:`DRAIN_SECRET`}),` in your Worker, or the `,_jsx(_components.code,{children:`Authorization`}),` header in your Logpush job or Vercel drain, with the new value.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Bots missing from Logpush data`}),` — make sure `,_jsx(_components.code,{children:`ClientRequestUserAgent`}),` is in the job’s field list.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Still stuck? Email `,_jsx(_components.a,{href:`mailto:[email protected]`,children:`[email protected]`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configuring AI Traffic","description":"Connect server logs to Gauge to power the AI Traffic page.","href":"/help/ai-traffic-setup"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configuring AI Traffic","slug":"configuring-ai-traffic","depth":2,"children":[]},{"title":"Your Drain URL and Secret","slug":"your-drain-url-and-secret","depth":2,"children":[]},{"title":"Vercel Setup","slug":"vercel-setup","depth":2,"children":[]},{"title":"Cloudflare Setup","slug":"cloudflare-setup","depth":2,"children":[{"title":"Option 1: Automatic Worker Setup (Recommended)","slug":"option-1-automatic-worker-setup-recommended","depth":3,"children":[]},{"title":"Enable a Zone","slug":"enable-a-zone","depth":4,"children":[]},{"title":"Verify","slug":"verify","depth":4,"children":[]},{"title":"Option 2: Manual Worker Setup","slug":"option-2-manual-worker-setup","depth":3,"children":[]},{"title":"Option 3: Logpush (Cloudflare Enterprise)","slug":"option-3-logpush-cloudflare-enterprise","depth":3,"children":[]}]},{"title":"Manual Setup","slug":"manual-setup","depth":2,"children":[{"title":"Request Schema","slug":"request-schema","depth":3,"children":[]},{"title":"Send and Validate an Event","slug":"send-and-validate-an-event","depth":3,"children":[]}]},{"title":"Turning It Off","slug":"turning-it-off","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"gauge-42561b62","siteName":"Gauge Docs","title":"Configuring AI Traffic - Gauge Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-25T18:33:01.506Z","originalFileLocation":"help/ai-traffic-setup.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Connect server logs to Gauge to power the AI Traffic page.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gauge Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configuring AI Traffic - Gauge Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect server logs to Gauge to power the AI Traffic page.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gauge Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.withgauge.com/help/ai-traffic-setup\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gauge-42561b62.mintlify.site/_mintlify/api/og/v2?division=Integrations\u0026amp;title=Configuring+AI+Traffic\u0026amp;description=Connect+server+logs+to+Gauge+to+power+the+AI+Traffic+page.\u0026amp;theme=454bb40999979e0bc12c6790\u0026amp;signature=018ff063d2a7614b478cce2b8e240735f390ef31d2237f9d41886b76924d5658\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configuring AI Traffic - Gauge Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect server logs to Gauge to power the AI Traffic page.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gauge-42561b62.mintlify.site/_mintlify/api/og/v2?division=Integrations\u0026amp;title=Configuring+AI+Traffic\u0026amp;description=Connect+server+logs+to+Gauge+to+power+the+AI+Traffic+page.\u0026amp;theme=454bb40999979e0bc12c6790\u0026amp;signature=018ff063d2a7614b478cce2b8e240735f390ef31d2237f9d41886b76924d5658\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gauge-42561b62/d3-6r91DtnHOn4L9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gauge Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#051b23\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.withgauge.com/help/ai-traffic-setup\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/help/ai-traffic-setup.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.withgauge.com/#organization\",\"name\":\"Gauge Docs\",\"url\":\"https://docs.withgauge.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gauge-42561b62/O5gj27o-wX8DVccM/logo/light.svg?fit=max\u0026auto=format\u0026n=O5gj27o-wX8DVccM\u0026q=85\u0026s=6fb77f0aeb3f1d4b0404a3fb65f04c29\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.withgauge.com#website\",\"name\":\"Gauge Docs\",\"url\":\"https://docs.withgauge.com\",\"publisher\":{\"@id\":\"https://docs.withgauge.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.withgauge.com/help/ai-traffic-setup#webpage\",\"url\":\"https://docs.withgauge.com/help/ai-traffic-setup\",\"name\":\"Configuring AI Traffic\",\"description\":\"Connect server logs to Gauge to power the AI Traffic page.\",\"dateModified\":\"2026-08-25T18:33:01.506Z\",\"isPartOf\":{\"@id\":\"https://docs.withgauge.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.withgauge.com/help/ai-traffic-setup#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.withgauge.com/help/ai-traffic-setup#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://docs.withgauge.com/help/google-integration\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configuring AI Traffic\",\"item\":\"https://docs.withgauge.com/help/ai-traffic-setup\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.withgauge.com/help/ai-traffic-setup#article\",\"headline\":\"Configuring AI Traffic\",\"name\":\"Configuring AI Traffic\",\"description\":\"Connect server logs to Gauge to power the AI Traffic page.\",\"url\":\"https://docs.withgauge.com/help/ai-traffic-setup\",\"mainEntityOfPage\":{\"@id\":\"https://docs.withgauge.com/help/ai-traffic-setup#webpage\"},\"dateModified\":\"2026-08-25T18:33:01.506Z\",\"publisher\":{\"@id\":\"https://docs.withgauge.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.withgauge.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gauge Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Gauge Docs","nav":{"global":null,"products":[{"product":"Gauge Chat","icon":"messages","description":"AI visibility","groups":[{"group":"Introduction","pages":[{"title":"Gauge Chat overview","sidebarTitle":"Overview","href":"/introduction/welcome"},{"title":"Using Gauge Chat and Gauge Agents","href":"/introduction/chat-and-agents"},{"title":"Connect Gauge to your tools","href":"/introduction/connect-your-tools"},{"title":"Gauge Chat quickstart","sidebarTitle":"Quickstart","href":"/setup/integrations-and-settings"},{"title":"How do AI Models Search?","href":"/introduction/how-do-ai-models-search"},{"title":"Core AEO Metrics","href":"/introduction/core-aeo-metrics"},{"title":"How to Improve AI Visibility","href":"/introduction/how-to-improve-ai-visibility"}]},{"group":"Key Concepts","pages":[{"title":"AI Engines Gauge Tracks","href":"/navigating/ai-engines"},{"title":"Prompt Runs","href":"/navigating/prompt-runs"},{"title":"Branded Prompts","href":"/help/branded-prompts"},{"title":"Memory","href":"/navigating/memory"},{"title":"Skills","href":"/navigating/skills"},{"title":"Scheduled prompts","href":"/navigating/scheduled-prompts"},{"title":"Agencies","href":"/navigating/agencies"}]},{"group":"Navigating Gauge","pages":[{"title":"Organization Dashboard","href":"/navigating/dashboard"},{"title":"Ask Gauge","href":"/navigating/ask-gauge"},{"title":"Action Center","href":"/navigating/action-center"},{"title":"Rankings \u0026 Visibility","href":"/navigating/rankings-visibility"},{"title":"Prompts","href":"/navigating/prompts"},{"title":"Citations","href":"/navigating/citations"},{"title":"Topics","href":"/navigating/topics"},{"title":"Competitors \u0026 Brand Tracking","href":"/navigating/competitors"},{"title":"Sentiment Analysis","href":"/navigating/sentiment-analysis"},{"title":"Reddit","href":"/navigating/reddit"},{"title":"YouTube","href":"/navigating/youtube"},{"title":"AI Traffic","href":"/navigating/ai-traffic"},{"title":"Fanouts","href":"/navigating/fanouts"},{"title":"Content Engine","href":"/navigating/content"},{"title":"Library","href":"/navigating/library"},{"title":"ChatGPT Ads","href":"/navigating/chatgpt-ads"},{"title":"Ads Monitoring","href":"/navigating/ads-monitoring"}]},{"group":"Integrations","pages":[{"title":"Google Integration (Search Console, Analytics \u0026 Ads)","href":"/help/google-integration"},{"title":"PostHog integration","href":"/help/posthog-integration"},{"title":"CMS Integrations","href":"/help/cms-integrations"},{"title":"Slack Integration","href":"/help/slack-integration"},{"title":"Bring Your Own Key (BYOK)","href":"/help/byok"},{"title":"Sitemap Import","description":"Pull your site's pages into Gauge from your sitemap so their citations are tracked and they show up in Library.","href":"/help/sitemap-import"},{"title":"Configuring AI Traffic","href":"/help/ai-traffic-setup"}]},{"group":"Account \u0026 Help","pages":[{"title":"Team Members","description":"Invite teammates to your Gauge workspace, manage their access, and let people with your company email domain join automatically.","href":"/help/team-members"},{"title":"Billing \u0026 Plans","href":"/help/billing"},{"title":"Notifications \u0026 Email Digests","href":"/help/notifications"},{"title":"Tags","href":"/help/tags"},{"title":"Data Exports","href":"/help/exports"},{"title":"Troubleshooting data","href":"/help/troubleshooting-data"},{"title":"Publish and measure content","href":"/help/publish-and-measure-content"}]},{"group":"API","pages":[{"title":"Authenticate with the API","href":"/chat/api/authentication"},{"title":"Use the Chat API","href":"/chat/api/use-the-api"}]},{"group":"API reference","pages":[{"title":"Chat API reference","sidebarTitle":"Overview","href":"/chat/api-reference/overview"},{"group":"Endpoints","pages":[{"group":"Organizations","pages":[{"openapi":"chat/openapi.json GET /me","title":"Get current credential","href":"/chat/api-reference/endpoints/organizations/get-current-credential"},{"openapi":"chat/openapi.json GET /orgs","title":"List organizations","href":"/chat/api-reference/endpoints/organizations/list-organizations"},{"openapi":"chat/openapi.json GET /orgs/{org}","title":"Get organization","href":"/chat/api-reference/endpoints/organizations/get-organization"},{"openapi":"chat/openapi.json GET /orgs/{org}/categories","title":"List categories","href":"/chat/api-reference/endpoints/organizations/list-categories"},{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}","title":"Get category","href":"/chat/api-reference/endpoints/organizations/get-category"}]},{"group":"Topics","pages":[{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/topics","title":"List topics","href":"/chat/api-reference/endpoints/topics/list-topics"},{"openapi":"chat/openapi.json POST /orgs/{org}/categories/{category}/topics","title":"Create topic","href":"/chat/api-reference/endpoints/topics/create-topic"},{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/topics/{topic_id}","title":"Get topic","href":"/chat/api-reference/endpoints/topics/get-topic"},{"openapi":"chat/openapi.json PATCH /orgs/{org}/categories/{category}/topics/{topic_id}","title":"Rename topic","href":"/chat/api-reference/endpoints/topics/rename-topic"}]},{"group":"Prompts","pages":[{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/prompts","title":"List prompts","href":"/chat/api-reference/endpoints/prompts/list-prompts"},{"openapi":"chat/openapi.json POST /orgs/{org}/categories/{category}/prompts","title":"Create prompts","href":"/chat/api-reference/endpoints/prompts/create-prompts"},{"openapi":"chat/openapi.json PATCH /orgs/{org}/categories/{category}/prompts","title":"Bulk update prompts","href":"/chat/api-reference/endpoints/prompts/bulk-update-prompts"},{"openapi":"chat/openapi.json POST /orgs/{org}/categories/{category}/prompts/tags","title":"Add tags to prompts","href":"/chat/api-reference/endpoints/prompts/add-tags-to-prompts"},{"openapi":"chat/openapi.json DELETE /orgs/{org}/categories/{category}/prompts/tags","title":"Remove tags from prompts","href":"/chat/api-reference/endpoints/prompts/remove-tags-from-prompts"},{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/prompts/{prompt_id}","title":"Get prompt","href":"/chat/api-reference/endpoints/prompts/get-prompt"},{"openapi":"chat/openapi.json PATCH /orgs/{org}/categories/{category}/prompts/{prompt_id}","title":"Update prompt","href":"/chat/api-reference/endpoints/prompts/update-prompt"}]},{"group":"Tags","pages":[{"openapi":"chat/openapi.json GET /orgs/{org}/tags","title":"List tags","href":"/chat/api-reference/endpoints/tags/list-tags"},{"openapi":"chat/openapi.json POST /orgs/{org}/tags","title":"Create tag","href":"/chat/api-reference/endpoints/tags/create-tag"},{"openapi":"chat/openapi.json GET /orgs/{org}/tags/{tag_id}","title":"Get tag","href":"/chat/api-reference/endpoints/tags/get-tag"},{"openapi":"chat/openapi.json PATCH /orgs/{org}/tags/{tag_id}","title":"Update tag","href":"/chat/api-reference/endpoints/tags/update-tag"},{"openapi":"chat/openapi.json DELETE /orgs/{org}/tags/{tag_id}","title":"Delete tag","href":"/chat/api-reference/endpoints/tags/delete-tag"}]},{"group":"Brands","pages":[{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/brands","title":"List brands","href":"/chat/api-reference/endpoints/brands/list-brands"}]},{"group":"Query","pages":[{"openapi":"chat/openapi.json POST /orgs/{org}/query","title":"Run a report query","href":"/chat/api-reference/endpoints/query/run-a-report-query"},{"openapi":"chat/openapi.json GET /orgs/{org}/query/metadata","title":"Get the query catalog","href":"/chat/api-reference/endpoints/query/get-the-query-catalog"}]},{"group":"Answers","pages":[{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/answers","title":"List answers","href":"/chat/api-reference/endpoints/answers/list-answers"},{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/answers/{answer_id}","title":"Get answer","href":"/chat/api-reference/endpoints/answers/get-answer"},{"openapi":"chat/openapi.json GET /orgs/{org}/categories/{category}/citations","title":"List citations","href":"/chat/api-reference/endpoints/answers/list-citations"}]}]}]},{"group":"Resources","pages":[{"title":"Understanding your metrics","href":"/resources/measurement-reference"},{"title":"MCP tool list","href":"/resources/mcp-tools"},{"title":"AEO Glossary","href":"/resources/glossary"},{"title":"FAQ","href":"/resources/faq"},{"title":"Changelog","href":"/resources/changelog"}]}]},{"product":"Gauge Agents","icon":"code","description":"Coding Agent optimization","pages":[{"title":"Gauge Agents","href":"/agents"}]}]},"basePath":"","title":"Configuring AI Traffic - Gauge Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}