पाठ 15 / 25

Traffic और Server Logs

Referrers और log विश्लेषण से देखें कि AI assistants आगंतुक भेज रहे हैं और AI crawlers आ रहे हैं।

प्रमाण के दो प्रकार

आगंतुक: अपने analytics में chatgpt.com, perplexity.ai, gemini.google.com, claude.ai और copilot.microsoft.com जैसे referrer domains देखें, और अपने नियंत्रण के links में UTM parameters जोड़ें। ध्यान दें कि कुछ AI traffic बिना referrer के आता है और "direct" दिखता है, इसलिए अंक निचली सीमा हैं। Crawlers: आपके server access logs दिखाते हैं कि कौन-से AI user agents कौन-से पन्ने कितनी बार लाते हैं, और क्या उन्हें errors मिलते हैं। क़ीमत और docs पन्नों पर बढ़ते crawler hits और स्वस्थ 200 response दर इस बात के अच्छे संकेत हैं कि आपकी सामग्री तक पहुँचा जा सकता है।

AI crawler hits गिनना, चलाकर

मैंने यह पाँच गढ़ी log पंक्तियों पर चलाया: GPTBot 2, ClaudeBot 1, PerplexityBot 1 और एक सामान्य browser। असली logs कहीं बड़े होते हैं, और providers द्वारा प्रकाशित IP ranges भी जाँचें, क्योंकि user-agent strings नक़ली हो सकती हैं।

import re
from collections import Counter
logs = [
 '1.2.3.4 - - [01/Oct/2026] "GET /pricing HTTP/1.1" 200 512 "-" "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"',
 '1.2.3.5 - - [01/Oct/2026] "GET /docs HTTP/1.1" 200 900 "-" "Mozilla/5.0 (compatible; ClaudeBot/1.0)"',
 '1.2.3.6 - - [01/Oct/2026] "GET /pricing HTTP/1.1" 200 512 "-" "Mozilla/5.0 (compatible; PerplexityBot/1.0)"',
 '9.9.9.9 - - [01/Oct/2026] "GET / HTTP/1.1" 200 400 "-" "Mozilla/5.0 (Windows NT 10.0) Chrome/120"',
 '1.2.3.4 - - [01/Oct/2026] "GET /blog HTTP/1.1" 200 700 "-" "Mozilla/5.0 (compatible; GPTBot/1.1)"',
]
BOTS = re.compile(r"(GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|PerplexityBot|Google-Extended|CCBot)")
hits = Counter()
for line in logs:
    ua = line.rsplit('"', 2)[-2]
    m = BOTS.search(ua)
    hits[m.group(1) if m else "other"] += 1
print(dict(hits))

Output:

{'GPTBot': 2, 'ClaudeBot': 1, 'PerplexityBot': 1, 'other': 1}

Referrers वर्गीकृत करना, चलाकर

Referrers को AI assistants, search और अन्य में समूहित करें ताकि AI-स्रोत वाली visits का समय के साथ चार्ट बना सकें।

from urllib.parse import urlparse
AI = {"chatgpt.com": "ChatGPT", "perplexity.ai": "Perplexity",
      "gemini.google.com": "Gemini", "claude.ai": "Claude",
      "copilot.microsoft.com": "Copilot"}

def source(ref):
    host = (urlparse(ref).hostname or "").removeprefix("www.")
    return AI.get(host, "search" if host in ("google.com", "bing.com") else "other")

refs = ("https://chatgpt.com/", "https://www.perplexity.ai/search?q=x",
        "https://www.google.com/", "https://news.example/")
print([source(r) for r in refs])

Output:

['ChatGPT', 'Perplexity', 'search', 'other']

त्वरित जाँच: Analytics में AI-referred visits कम क्यों गिनी जा सकती हैं?

  • कुछ बिना referrer के आती हैं और direct दिखती हैं
  • AI assistants analytics block करते हैं
  • Referrers कभी दर्ज नहीं होते
  • वे हमेशा ज़्यादा गिनी जाती हैं
Answer

कुछ बिना referrer के आती हैं और direct दिखती हैं — ग़ायब referrers का मतलब है कि बताया गया AI traffic निचली सीमा है।