How to Track and Optimize AEO With Nginx: Salespeak AI Proxy Setup

A red, orange and blue "S" - Salespeak Images
Omer Gotlieb Cofounder and CEO - Salespeak Images
Salespeak Team
7 min read
March 9, 2026

AI bots now account for roughly 66% of global internet traffic. Your Nginx access logs are full of them: ChatGPT, Claude, Gemini, Perplexity, all crawling your pages, ingesting your content, and shaping how AI models answer questions about your brand. And your Google Analytics dashboard? It sees none of it.

GA runs client-side JavaScript. Bots don't execute JavaScript. So you've got a massive blind spot sitting right at the infrastructure layer you already control.

If you're running Nginx, you can fix that today. Salespeak's AI Proxy is a lightweight Lua-based integration that detects AI visitors at the server level, serves them optimized content, and gives you visibility into traffic that your analytics stack completely misses.

Why Nginx is the right place to solve this

Nginx powers about 34% of web servers globally. Teams choose it because they want control over routing, caching, load balancing, everything. No black-box CDN. No managed platform making decisions for you.

The Salespeak AI Proxy fits that philosophy. It's not a third-party service you route traffic through. It's a set of four Lua modules that run directly inside your existing Nginx config, using Nginx's event loop. The overhead is minimal. The control stays with you.

Here's why the server layer matters for AEO specifically:

  • AI crawling grew 15x in 2025. That volume isn't slowing down. Detecting and responding to these requests at the server level, before they hit your application, is the only approach that scales.
  • Client-side tools can't see bots. Google Analytics, Hotjar, Segment: they all rely on JavaScript execution. AI crawlers don't run JS. If you're only measuring with client-side tools, you're measuring a shrinking slice of your actual traffic.
  • Content optimization needs to happen at the request level. Serving AI-optimized content means making a decision per-request: is this visitor human or AI? Nginx is the natural place to make that decision.

What the AI Proxy actually does

The Salespeak AI Proxy handles two things: detection and optimization.

Detection

The Lua modules inspect incoming requests and identify AI visitors — ChatGPT's crawler, Claude's retrieval system, Gemini's indexing, Perplexity's search bot, and other LLM-based agents. This happens at the Nginx level, so it catches traffic that never shows up in browser-based analytics.

You get actual data on which AI systems are crawling your site, how often, and which pages they're hitting. That's the baseline you need before you can optimize anything.

Optimization

When an AI visitor is detected, the proxy serves Salespeak-optimized content that's structured to improve how your brand, product, and messaging appear in AI-generated answers. Think of it as the AEO equivalent of serving different content to mobile vs. desktop, except the split is human vs. AI.

The critical detail: human visitors see your site exactly as it is. No changes to the user experience. No impact on page speed, rendering, or functionality. The optimization layer only activates for AI traffic.

Fail-safe by design

This is the part that matters most to any ops team evaluating a new integration: what happens when things break?

If the Salespeak service is unreachable (network issue, maintenance window, anything), your site continues to function normally for all visitors. Human traffic is completely unaffected. AI traffic still gets your standard pages. There's no degradation, no error pages, no downtime.

The Lua modules are designed with failure as the default safe state. If the proxy can't reach Salespeak, it steps aside. Your Nginx config keeps doing what it's always done.

What's in the package

The AI Proxy ships as a small, self-contained package:

  • 4 Lua modules: handles detection, routing, content serving, and fallback logic. Runs natively in Nginx's event loop with no external runtime dependencies.
  • Copy-paste Nginx config snippets: drop them into your existing nginx.conf or site config files. No need to restructure your setup.
  • Install helper script: automates the setup steps for fast deployment.

The whole thing works on any Nginx deployment. Bare metal servers, Docker containers, Kubernetes pods — doesn't matter. If you've got Nginx with Lua support (OpenResty or the standard ngx_http_lua_module), you're good.

Setup in practice

The install process takes minutes, not hours. Here's the rough flow:

  1. Drop the Lua modules into your Nginx Lua path (typically /usr/local/openresty/lualib/ or wherever your setup expects them).
  2. Add the config snippets to your server block. The provided snippets handle the access_by_lua and content_by_lua phases — detection happens in the access phase, content serving in the content phase.
  3. Reload Nginx. That's nginx -s reload. No restart required. Zero downtime.
  4. Verify by checking your logs or the Salespeak dashboard for AI visitor data.

No DNS changes. No SSL certificate swaps. No traffic rerouting through a third-party network. Your existing infrastructure stays intact.

How this compares to CDN-level approaches

If you're running behind Cloudflare or AWS CloudFront, you've got CDN-level options and edge function approaches for AEO tracking. Those work well — but they require your traffic to flow through a specific provider's network.

The Nginx approach is different. It's infrastructure-agnostic. You can run it behind any CDN, or no CDN at all. You can run it on a $5/month VPS or a fleet of load-balanced servers across three regions. The integration point is your web server, not your network provider.

For teams that have standardized on Nginx and don't want to add CDN-specific logic, or teams running hybrid setups where some traffic bypasses the CDN, the direct Nginx integration fills a gap that edge-based solutions can't.

What you can do with the data

Once the AI Proxy is running, you'll start seeing traffic patterns that were previously invisible:

  • Which AI models are crawling your site, and how frequently. You might find that Perplexity hits your product pages daily while ChatGPT's crawler focuses on your blog content.
  • Which pages attract AI attention. This tells you where to focus your AEO optimization efforts. If AI crawlers are ignoring your pricing page but hitting your competitor comparison content, that's signal.
  • Crawl frequency trends. Are AI visits increasing? Decreasing? Spiking after you publish new content? These patterns inform your content strategy.

This data feeds directly into your broader AEO measurement framework. Citation tracking tells you whether AI models mention your brand. The AI Proxy tells you whether they're even looking at your content in the first place.

Getting started

If you're running Nginx and you want to see what AI traffic actually looks like on your site, the AI Proxy is the fastest path to real data.

Three things to do right now:

  1. Check your Nginx setup. Confirm you have Lua module support (nginx -V 2>&1 | grep lua). If you're on OpenResty, you're already set.
  2. Request the AI Proxy package from Salespeak. You'll get the Lua modules, config snippets, and install script.
  3. Deploy and start measuring. Within a day, you'll have visibility into AI traffic that your current stack can't provide.

Your competitors' content is already being crawled, indexed, and cited by AI models. The question isn't whether AI bots are visiting your site — it's whether you know about it, and whether you're shaping what they find.

Newsletter

Stay ahead of the AI sales and marketing curve with our exclusive newsletter directly in your inbox. All insights, no fluff.
Thanks! We're excited to talk more about B2B GTM and AI!
Oops! Something went wrong while submitting the form.

Share this Post