filtering-bot-traffic
Fungsinya
Skill ini mengajarkan agent mengenali bot, perayap, dan agent AI dalam data PostHog lalu menghapusnya dari angka Anda. Skill ini untuk pemilik situs yang ingin analitik yang menampilkan pengunjung manusia.
Kapan dipakai
- βSaat Anda ingin menghapus bot dari tampilan halaman atau laporan lain.
- βSaat Anda ingin tahu berapa banyak lalu lintas situs Anda berasal dari bot atau perayap AI.
- βSaat Anda ingin tahu apakah alat AI tertentu mengunjungi situs Anda.
Link skill
https://github.com/PostHog/posthog/blob/master/products/web_analytics/skills/filtering-bot-traffic/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBerapa banyak lalu lintas situs web saya yang berasal dari bot? Tolong tampilkan angka saya tanpa bot.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
PostHog mengklasifikasikan setiap permintaan berdasarkan user agent-nya. Agent memakai klasifikasi itu dalam kueri atau pembuat insight untuk menyertakan atau mengecualikan lalu lintas bot dalam laporan historis.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Filtering and measuring bot traffic
PostHog classifies every request by user agent so you can tell humans apart from bots, crawlers, and AI agents anywhere HogQL runs β the SQL editor, insights, trends, and Web analytics breakdowns. This skill teaches you (the agent) how to use that classification to:
- exclude bots so analytics reflect human traffic only
- measure how much traffic is automated, and which bots / operators are responsible
- separate AI-agent traffic (worth measuring) from noise (worth dropping)
- pick the right surface β virtual properties for the insight builder, functions for raw SQL
For real-time ("right now", last 30 min) bot questions and the Live tab tiles, use the exploring-live-traffic skill instead. This skill is for historical windows, saved insights, dashboards, and filtering.
When to use this skill
Use it when the user wants to:
- exclude or filter out bots ("remove bots from my pageviews", "humans only")
- quantify automated traffic ("what % of traffic is bots?", "how much is AI crawlers?")
- find which bots hit them ("which crawlers visit us?", "is ChatGPT reading our docs?")
- break a trend down by traffic type or bot name
- measure AI-agent / AI-search traffic specifically (AEO / answer-engine visibility)
Do not use it for the Live tab, real-time numbers, or the per-minute bot charts β that is exploring-live-traffic.
The classification surface
Two equivalent ways to reach the same classification. Prefer virtual properties in the insight builder and filters; use functions in hand-written SQL or when you need a value the virtual properties don't expose.
Virtual properties (insight builder, filters, breakdowns)
These read the user agent for you (falling back from $raw_user_agent to $user_agent),
so you don't pass anything in. Available wherever you pick an event property.
| Property | Value |
|---|---|
$virt_is_bot |
boolean β true for bots / crawlers / automation |
$virt_traffic_type |
Regular, AI Agent, Bot, or Automation |
$virt_traffic_category |
finer category, e.g. ai_crawler, ai_search, ai_assistant, search_crawler, seo_crawler, social_crawler, monitoring, http_client, headless_browser, no_user_agent, regular |
$virt_bot_name |
display name, e.g. Googlebot, GPTBot, ClaudeBot |
$virt_bot_operator |
company behind the bot, e.g. Google, OpenAI, Anthropic |
HogQL functions (raw SQL)
Pass properties.$raw_user_agent (and optionally properties.$ip) as is, the same arguments the
virtual properties use. Don't wrap it, e.g. in coalesce(...): server and mobile SDK events (and
cookieless events) are exempt from the empty-UA rule only when the argument is that plain field.
| Function | Returns |
|---|---|
isLikelyBot(ua) |
true on a bot pattern or empty UA (server/mobile SDK events exempt) |
getTrafficType(ua) |
AI Agent / Bot / Automation / Regular |
getTrafficCategory(ua) |
subcategory; regular for humans |
getBotType(ua) |
same subcategory but empty string for humans β handy for filtering |
getBotName(ua) |
bot name; empty for humans |
getBotOperator(ua) |
operator |
Pertanyaan umum
Apakah skill ini mencakup lalu lintas bot secara langsung?
Tidak. Pertanyaan tentang bot langsung ditangani skill lalu lintas langsung terpisah, sedangkan skill ini untuk laporan historis.
Bisakah ia menyebutkan nama bot yang mengunjungi situs saya?
Bisa. Ia dapat memecah lalu lintas berdasarkan nama bot dan operatornya, sehingga Anda tahu perayap mana yang bertanggung jawab.
Bisakah saya memakainya di insight dan dashboard tersimpan?
Bisa. Skill ini berfungsi pada rentang waktu historis, insight tersimpan, dashboard, dan filter.
Detail
Deskripsi asli dari pembuat
Identify, measure, and exclude bot / crawler / AI-agent traffic in PostHog web and product analytics using the traffic classification surface (the isLikelyBot / getTrafficType HogQL functions and the $virt_* virtual properties). Use when the user asks to "exclude bots", "filter out crawlers", "remove bot traffic from my numbers", "how much of my traffic is bots / AI crawlers", "is GPTBot / ChatGPT / Claude hitting my site", "break down traffic by human vs bot", or wants clean human-only counts in an insight or dashboard. For the real-time Live tab bot tiles, use exploring-live-traffic instead.
repo: PostHog/posthog
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6975
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
gitcrawl
394kMemungkinkan agent Anda mencari arsip issue dan pull request GitHub yang tersimpan, mengelompokkan yang duplikat, dan memeriksa status terkininya di GitHub.
slacrawl
394kMemungkinkan agent Anda mencari dan menghitung pesan di arsip Slack lokal, memeriksa seberapa baru arsip itu, dan menyegarkannya bila diperlukan.
goplaces
394kMembantu agent Anda mencari tempat, mendapatkan detail dan ulasannya, serta menentukan nama tempat memakai Google Places, dengan keluaran JSON untuk skrip.