# Analytics, GA4/GSC/PostHog & AI Bot Tracking

> Correlate AI visibility with organic traffic, Core Web Vitals, and real-time AI crawler visits to your pages.

Weelkit unifies search analytics, Core Web Vitals, and live AI crawler telemetry so you can see whether AI bots are actually crawling the pages you optimize.

## Connecting Analytics Providers

Under **Settings → Analytics**, connect any combination of:
- **Google Analytics 4 (GA4)** via Google OAuth (sessions, AI referral traffic from `chatgpt.com`, `perplexity.ai`, `claude.ai`, `gemini.google.com`)
- **Google Search Console (GSC)** via Google OAuth (impressions, clicks, queries, top landing pages)
- **PostHog** via Project API Key (product/landing events & referral funnels)
- **PageSpeed Insights** (automatic CrUX + Lighthouse LCP, CLS, INP, TTFB checks for your top site pages)

## Real-Time AI Bot Hit Ingestion

Send server, Cloudflare Worker, or Nginx log hits for AI crawlers (`GPTBot`, `OAI-SearchBot`, `ChatGPT-User`, `ClaudeBot`, `PerplexityBot`, `Google-Extended`) to your organization's dedicated ingest webhook using your org's `X-Weelkit-Ingest-Key`:

```bash
curl -X POST "https://api.weelkit.com/webhooks/bot-hits/{orgId}" \
  -H "Content-Type: application/json" \
  -H "X-Weelkit-Ingest-Key: wk_ingest_..." \
  -d '{
    "hits": [
      {
        "botName": "GPTBot",
        "userAgent": "Mozilla/5.0 AppleWebKit/537.36 (compatible; GPTBot/1.2)",
        "path": "/pricing",
        "statusCode": 200,
        "occurredAt": "2026-11-30T12:00:00Z"
      }
    ]
  }'
```

View crawler volume, top crawled URLs, and 4xx/5xx crawl errors under **Analytics → AI Bot Activity**.
