Skip to main content

Purpose

Stores AI bot visits (recommendations) from tracking scripts embedded in AI-optimized sites. No authentication required.

Architecture

Request Body

{
  "page_url": "https://business.searchcompany.dev/topic/",
  "page_type": "boosted_page",
  "page_title": "Topic Title",
  "user_agent": "...",
  "ip_address": "...",
  "referrer": "...",
  "screen_width": 1920,
  "screen_height": 1080,
  "language": "en-US",
  "timezone": "America/New_York"
}

Bot Identification

The identify_ai_bot() function checks user agent patterns:
  • ChatGPT
  • Claude
  • Gemini
  • Perplexity
  • Copilot
  • DeepSeek
  • Grok
  • Google AI
Unidentified visits are stored with platform_id='unknown'.

Code Location

src/app/webhooks/ai_platform_recommendations_store/routes.py