AI Visibility Tracking
Track how your brand and products are mentioned in AI-generated search responses across ChatGPT, Perplexity, Claude, Gemini, and Grok.
Overview#
AI Visibility Tracking answers: "When someone asks an AI assistant about my product category, does my brand appear — and where?"
You register natural-language queries, schedule them to run across AI providers, and the platform extracts brand mentions, ranks your position, and tracks sentiment over time.
Key Concepts#
| Term | Definition |
|---|---|
| AIQuery | A registered query (e.g. "best running shoes under $150") with a schedule and provider list |
| AIQueryResult | A single execution of a query against one provider — stores raw response + extracted entities |
| Mention Rate | % of results where your brand appeared |
| Avg Position | Average rank of your brand when mentioned (1 = first) |
| Share of Voice | Your brand mentions as a fraction of all brand mentions in responses |
| Sentiment Score | 0–1 score (0 = negative, 0.5 = neutral, 1 = positive) |
| Simulated | Results from providers without configured API keys — realistic placeholder, not real LLM output |
Setup#
Provider API Keys#
Configure in your environment:
| Provider | Env Var | SDK Used |
|---|---|---|
| Claude | ANTHROPIC_API_KEY | anthropic (already required) |
| ChatGPT | OPENAI_API_KEY | openai |
| Perplexity | PERPLEXITY_API_KEY | openai (compatible base URL) |
| Gemini | — | Stub until configured |
| Grok | — | Stub until configured |
Without a key, a provider returns is_simulated: true with plausible placeholder text.
Entity Extraction#
Extraction uses Claude Haiku. It always uses ANTHROPIC_API_KEY. If the key is absent, extracted entities default to empty arrays.
Query Registration#
From AI Visibility → Query Manager, click Add query:
- Query text — the natural-language question, max 1000 chars
- Category — optional grouping (brand awareness, product discovery, etc.)
- Providers — which AI providers to run against (defaults to all 5)
- Schedule — hourly, daily, or weekly execution
Scheduling#
Celery beat runs schedule_ai_query_execution every 5 minutes. It finds all active queries where last_run_at is null or past the schedule threshold and enqueues run_ai_query for each.
Dashboard#
/ai-reach shows:
- 4 KPI cards — Mention Rate, Avg Position, Share of Voice, Sentiment Score
- 30-day timeline — mention rate trend chart
- Provider breakdown — per-provider metrics table
Integration with Product Segments#
M14 activates the ai_visibility_metric condition type in product segments (previously stubbed to 1=0). Supported operators:
| Condition | Description |
|---|---|
not_ai_visible = true | Products whose SKU has not appeared in any real AI response in the last 30 days |
mention_rate >= 0.5 | Products with ≥50% mention rate across recent snapshots |
share_of_voice >= 0.2 | Products appearing in ≥20% of AI response brand mentions |
avg_position <= 3 | Products ranking in the top 3 when mentioned |
These conditions query segmentation.ai_visibility_snapshots directly. Only non-simulated results (is_simulated = 0) are used.
Code Paths#
| File | Purpose |
|---|---|
apps/api/apps/ai_reach/models.py | AIQuery, AIQueryResult models |
apps/api/apps/ai_reach/adapters.py | BaseProviderAdapter + 5 implementations |
apps/api/apps/ai_reach/extraction.py | Claude Haiku entity extraction |
apps/api/apps/ai_reach/tasks.py | run_ai_query, schedule_ai_query_execution |
apps/api/apps/ai_reach/views.py | AIQueryViewSet, DashboardView |
apps/api/apps/product_segments/preview.py | _build_ai_visibility_metric (now live) |
apps/web/app/(app)/ai-reach/page.tsx | Dashboard UI |
apps/web/app/(app)/ai-reach/queries/page.tsx | Query manager |
apps/web/app/(app)/ai-reach/queries/new/page.tsx | New query form |
Adding a New Provider#
- Implement
class MyAdapter(BaseProviderAdapter)inadapters.pywithprovider_idandexecute() - Add to
ADAPTERSdict - Add to
AIQueryResult.PROVIDER_CHOICES - Add to
ALL_PROVIDER_IDS - No task or extraction changes needed — they use
ADAPTERSdynamically