exploring-live-traffic
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExploring Web analytics live traffic
探索Web分析实时流量
The Web analytics Live tab () shows real-time activity over a 30-minute sliding
window plus a 60-second "users online" count. It is the place to answer "what is happening
on my site right now?" — pageviews, named bots, devices, geo, top paths, top referrers, and
a live event feed.
/web/liveThis skill teaches you (the agent) how to:
- recognize a request that belongs on the Live tab
- read the tile model (what each card shows, where the data comes from)
- manipulate the only filter that exists (host)
- build product-analytics insights that match a Live tile when the user wants longer time ranges or deeper drill-down than the live window offers
The Live tab is not a HogQL playground — its data comes from a livestream backed by
short HogQL backfills. When the user wants to query "right now" data with HogQL, point
them at the tab; when they want historical breakdowns, build an insight with the patterns
below.
Web分析Live标签页()展示30分钟滑动窗口内的实时活动数据,以及过去60秒的“在线用户”统计。这里是回答“我的网站现在发生了什么?”的最佳场所——包括页面浏览量、已识别机器人、设备、地域信息、热门路径、热门来源网站,以及实时事件流。
/web/live本技能将教你(Agent)如何:
- 识别属于Live标签页处理范畴的请求
- 理解卡片模型(每张卡片展示的内容、数据来源)
- 操作唯一可用的筛选器(主机域名)
- 当用户需要比实时窗口更长的时间范围或更深入的钻取分析时,构建与Live标签页卡片匹配的产品分析洞察
Live标签页不是HogQL的试验场——其数据来自实时流,辅以短期HogQL回填。当用户想要用HogQL查询“当前”数据时,引导他们使用该标签页;当用户需要历史细分数据时,按照以下模式构建洞察。
When to use this skill
何时使用本技能
Use this skill when the user:
- asks "who is on my site right now?", "what is happening live?", "show me live traffic"
- mentions the "Live" tab, the "Live dashboard", or the live page ()
/web/live - asks about live bot traffic ("which bots are crawling me?", "is GPTBot scraping us?")
- wants to filter live traffic by domain / host
- wants to compare what they see on the Live tab to a longer time window — e.g. "the live tab shows GPTBot is hammering us, can you give me a 7-day chart of that?"
Do not use this skill for non-realtime web analytics work — for that, use the standard
Web analytics tab ().
/web当用户:
- 询问“现在谁在访问我的网站?”“实时情况如何?”“展示实时流量”
- 提及“Live标签页”“实时仪表板”或实时页面()
/web/live - 询问实时机器人流量(“哪些机器人在抓取我的网站?”“GPTBot是否在抓取我们的内容?”)
- 想要按域名/主机筛选实时流量
- 想要将Live标签页显示的数据与更长时间窗口进行对比——例如“Live标签页显示GPTBot在频繁访问我们,能否给我一份7天的相关图表?”
请勿将本技能用于非实时Web分析工作——此类工作请使用标准Web分析标签页()。
/webTab structure
标签页结构
URL:
/web/liveThe tab has two filter affordances and a grid of tiles. Date range is fixed: 30 minutes
sliding window for everything except "Users online" (last 60 seconds).
URL:
/web/live该标签页包含两个筛选控件和一组卡片。时间范围是固定的:除“在线用户”统计(过去60秒)外,所有数据均基于30分钟滑动窗口。
Filters
筛选器
There is only one filter on the live tab: the host (domain) selector.
- It comes from .
webAnalyticsFilterLogic.selectedHost - It is shared with the rest of Web analytics, so changing it on propagates to
/weband vice-versa./web/live - It is gated by feature flag . If the flag is off, no host filter UI is rendered and all tiles show data across every domain.
WEB_ANALYTICS_LIVE_DOMAIN_FILTER - Setting the host filter narrows: the SSE stream, the HogQL backfill queries (so the initial 30 min is host-scoped), and the "users online" count.
- There is no date picker, no compare control, no property filters, no test-account filter on the Live tab. Do not promise the user controls that don't exist.
When the user asks "filter live traffic by domain ", direct them to the Domain
selector at the top of the Live tab. There is no URL param to set it directly — it
persists in via .
<host>localStoragewebAnalyticsFilterLogicLive标签页上只有一个筛选器:主机(域名)选择器。
- 数据来源于。
webAnalyticsFilterLogic.selectedHost - 该筛选器与Web分析的其他模块共享,因此在上修改后会同步到
/web,反之亦然。/web/live - 该功能受特性标志控制。若该标志关闭,则不会显示主机筛选器UI,所有卡片将展示所有域名的汇总数据。
WEB_ANALYTICS_LIVE_DOMAIN_FILTER - 设置主机筛选器将缩小以下范围:SSE流、HogQL回填查询(因此初始30分钟数据仅包含指定主机)以及“在线用户”统计。
- Live标签页上没有日期选择器、对比控件、属性筛选器或测试账户筛选器。请勿向用户承诺不存在的控件。
当用户询问“按域名筛选实时流量”时,引导他们使用Live标签页顶部的“域名”选择器。无法通过URL参数直接设置该筛选器——它通过保存在中。
<host>webAnalyticsFilterLogiclocalStorageStat cards (top strip)
统计卡片(顶部栏)
| Card | What | Window |
|---|---|---|
| Users online | Distinct device IDs seen in the last 60 seconds | 60s |
| Unique visitors | Distinct device IDs in the last 30 min | 30m |
| Pageviews | | 30m |
| 卡片名称 | 展示内容 | 时间窗口 |
|---|---|---|
| 在线用户 | 过去60秒内出现的唯一设备ID数量 | 60秒 |
| 独立访客 | 过去30分钟内的唯一设备ID数量 | 30分钟 |
| 页面浏览量 | 过去30分钟内的 | 30分钟 |
Content cards
内容卡片
| Card | What | Notes |
|---|---|---|
| Active users per minute | Bar chart, new vs returning visitors | last 30 min |
| Top pages | Animated leaderboard, | top 10, 30 min |
| Top referrers | Animated leaderboard, | top 10, 30 min |
| Devices | Breakdown bars, | top 6 + Other |
| Browsers | Breakdown bars with logos, | top 6 + Other |
| Top countries | Breakdown bars, | top 6 + Other; replaced by a Country/City tab card if |
| Bot requests per minute | Bar chart, bot events / minute | flag |
| Bot traffic | Named bots ranked by event share, with category tag | flag |
| Countries (world map) | SVG world map heat | flag |
| Live events | Streamed event feed (event, person, URL, timestamp) | last 50 events |
Every tile (except the live event feed and world map) has an "Open as new insight"
button that opens a 7-day Trends query in product analytics. The bot traffic tile rows
are also individually clickable — clicking a bot row opens a single-bot trend.
| 卡片名称 | 展示内容 | 说明 |
|---|---|---|
| 每分钟活跃用户 | 柱状图,区分新访客与回访访客 | 过去30分钟 |
| 热门页面 | 动态排行榜,展示 | 前10名,基于过去30分钟数据 |
| 热门来源网站 | 动态排行榜,展示 | 前10名,基于过去30分钟数据 |
| 设备分布 | 分组柱状图,基于 | 前6类+其他 |
| 浏览器分布 | 带图标的分组柱状图,基于 | 前6类+其他 |
| 热门国家/地区 | 分组柱状图,基于 | 前6类+其他;若特性标志 |
| 每分钟机器人请求量 | 柱状图,每分钟机器人事件数量 | 需开启特性标志 |
| 机器人流量 | 按事件占比排序的已识别机器人,带分类标签 | 需开启特性标志 |
| 国家/地区(世界地图) | SVG世界地图热力图 | 需开启特性标志 |
| 实时事件流 | 流式事件 feed(事件、用户、URL、时间戳) | 最近50条事件 |
除实时事件流和世界地图外,每个卡片都有“打开为新洞察”按钮,可在产品分析模块中打开一个7天趋势查询。机器人流量卡片的行也可单独点击——点击某机器人行将打开该机器人的专属趋势分析。
Bot detection model
机器人检测模型
Bots are detected server-side. Three virtual properties are attached to the event before
it lands in ClickHouse:
- — boolean,
$virt_is_botif classified as a bottrue - — string, the bot's display name (e.g.
$virt_bot_name,Googlebot,GPTBot,Claude,Lighthouse)HeadlessChrome - — string, the category key:
$virt_traffic_category,ai_crawler,ai_search,ai_assistant,search_crawler,seo_crawler,social_crawler,monitoring,http_client,headless_browser,no_user_agentregular
The Live bot tiles count "bot-eligible" events: , , ,
, . is included because most bots emit server-side
HTTP logs rather than JS pageviews.
$pageview$pageleave$screen$http_log$autocapture$http_log机器人检测在服务端完成。事件进入ClickHouse前会附加三个虚拟属性:
- — 布尔值,若被归类为机器人则为
$virt_is_bottrue - — 字符串,机器人的显示名称(例如
$virt_bot_name、Googlebot、GPTBot、Claude、Lighthouse)HeadlessChrome - — 字符串,分类标识:
$virt_traffic_category、ai_crawler、ai_search、ai_assistant、search_crawler、seo_crawler、social_crawler、monitoring、http_client、headless_browser、no_user_agentregular
Live标签页的机器人卡片统计“符合机器人判定条件”的事件:、、、、。纳入是因为大多数机器人会产生服务端HTTP日志,而非JS页面浏览事件。
$pageview$pageleave$screen$http_log$autocapture$http_logBuilding product-analytics queries that mirror the Live tab
构建与Live标签页匹配的产品分析查询
When the user wants a longer window, a saved insight, a dashboard tile, or to share a
view of what's on the Live tab, build a Trends insight. The "Open as new insight"
buttons in the UI use exactly these recipes:
当用户需要更长时间窗口的数据、保存的洞察、仪表板卡片,或想要分享Live标签页的视图时,可构建Trends洞察。UI中的“打开为新洞察”按钮完全遵循以下规则:
Bot traffic breakdown (matches the bot tile header)
机器人流量细分(匹配机器人卡片表头)
A single chart of all bots over time, broken down by name. This is the canonical
"who's crawling me?" view.
json
{
"kind": "TrendsQuery",
"interval": "hour",
"dateRange": { "date_from": "-7d" },
"series": [
{
"kind": "GroupNode",
"custom_name": "Requests",
"operator": "OR",
"math": "total",
"nodes": [
{ "kind": "EventsNode", "event": "$pageview", "math": "total" },
{ "kind": "EventsNode", "event": "$pageleave", "math": "total" },
{ "kind": "EventsNode", "event": "$screen", "math": "total" },
{ "kind": "EventsNode", "event": "$http_log", "math": "total" },
{ "kind": "EventsNode", "event": "$autocapture", "math": "total" }
]
}
],
"properties": [{ "key": "$virt_is_bot", "value": ["true"], "operator": "exact", "type": "event" }],
"breakdownFilter": {
"breakdown": "$virt_bot_name",
"breakdown_type": "event",
"breakdown_limit": 25
},
"trendsFilter": { "display": "ActionsBarValue" }
}所有机器人随时间变化的单图表,按名称细分。这是标准的“谁在抓取我的网站?”视图。
json
{
"kind": "TrendsQuery",
"interval": "hour",
"dateRange": { "date_from": "-7d" },
"series": [
{
"kind": "GroupNode",
"custom_name": "Requests",
"operator": "OR",
"math": "total",
"nodes": [
{ "kind": "EventsNode", "event": "$pageview", "math": "total" },
{ "kind": "EventsNode", "event": "$pageleave", "math": "total" },
{ "kind": "EventsNode", "event": "$screen", "math": "total" },
{ "kind": "EventsNode", "event": "$http_log", "math": "total" },
{ "kind": "EventsNode", "event": "$autocapture", "math": "total" }
]
}
],
"properties": [{ "key": "$virt_is_bot", "value": ["true"], "operator": "exact", "type": "event" }],
"breakdownFilter": {
"breakdown": "$virt_bot_name",
"breakdown_type": "event",
"breakdown_limit": 25
},
"trendsFilter": { "display": "ActionsBarValue" }
}Single bot drill-down (matches a clicked bot row)
单个机器人钻取分析(匹配点击机器人行后的视图)
json
{
"kind": "TrendsQuery",
"interval": "hour",
"dateRange": { "date_from": "-7d" },
"series": [
/* same combined "Requests" GroupNode as above */
],
"properties": [
{ "key": "$virt_is_bot", "value": ["true"], "operator": "exact", "type": "event" },
{ "key": "$virt_bot_name", "value": ["GPTBot"], "operator": "exact", "type": "event" },
{ "key": "$virt_traffic_category", "value": ["ai_crawler"], "operator": "exact", "type": "event" }
],
"trendsFilter": { "display": "ActionsLineGraph" }
}The category filter is optional — include it when the user asks about a specific
bot+category combo ( is a different signal from
).
Lighthouse · headless_browserLighthouse · monitoringjson
{
"kind": "TrendsQuery",
"interval": "hour",
"dateRange": { "date_from": "-7d" },
"series": [
/* 与上述相同的组合“Requests” GroupNode */
],
"properties": [
{ "key": "$virt_is_bot", "value": ["true"], "operator": "exact", "type": "event" },
{ "key": "$virt_bot_name", "value": ["GPTBot"], "operator": "exact", "type": "event" },
{ "key": "$virt_traffic_category", "value": ["ai_crawler"], "operator": "exact", "type": "event" }
],
"trendsFilter": { "display": "ActionsLineGraph" }
}分类筛选器为可选——当用户询问特定机器人+分类组合时(与是不同信号),可添加该筛选器。
Lighthouse · headless_browserLighthouse · monitoringBot category breakdown (matches the bot events chart tile)
机器人分类细分(匹配机器人事件图表卡片)
Use breakdown by instead of when the user
wants "AI crawlers vs SEO crawlers vs everything else" rather than per-bot rows.
$virt_traffic_category$virt_bot_name当用户想要查看“AI爬虫 vs SEO爬虫 vs 其他类型”而非单个机器人数据时,使用作为细分维度,而非。
$virt_traffic_category$virt_bot_nameTop pages / referrers / devices / browsers / countries
热门页面/来源网站/设备/浏览器/国家/地区
For non-bot tiles, use with , breakdown by the
underlying property:
$pageviewmath: unique_users| Tile | breakdown property | display |
|---|---|---|
| Top pages | | |
| Top referrers | | |
| Devices | | |
| Browsers | | |
| Countries | | |
Always inherit the live tab's host filter when the user is asking about a specific
domain — add
to .
{ "key": "$host", "value": ["<host>"], "operator": "exact", "type": "event" }properties对于非机器人卡片,使用事件并设置,按对应属性进行细分:
$pageviewmath: unique_users| 卡片名称 | 细分属性 | 展示类型 |
|---|---|---|
| 热门页面 | | |
| 热门来源网站 | | |
| 设备分布 | | |
| 浏览器分布 | | |
| 国家/地区分布 | | |
当用户询问特定域名时,务必继承Live标签页的主机筛选器——在中添加。
properties{ "key": "$host", "value": ["<host>"], "operator": "exact", "type": "event" }Defaults to use
默认设置
- :
dateRange.date_fromunless the user names a window — the live view itself is 30 min, but the user is almost always asking about a longer window when they request an insight version.-7d - :
intervalfor 7-day windows,houronly for windows under a day,minutefor windows beyond 14 days.day - Always inherit the host filter when one is set on the Live tab. Don't drop it silently — that changes the answer.
- :除非用户指定时间窗口,否则设为
dateRange.date_from——Live视图本身是30分钟窗口,但用户请求洞察版本时几乎总是需要更长时间范围的数据。-7d - :7天窗口设为
interval,1天以内窗口设为hour,14天以上窗口设为minute。day - 当Live标签页设置了主机筛选器时,务必继承该筛选器。请勿无声丢弃——这会改变分析结果。
Common requests and the right move
常见请求及应对方案
| User says | Right move |
|---|---|
| "What's happening on the site right now?" | Send them to |
"Filter live traffic to | Use the Domain selector at top of |
| "Show me bots crawling us in the last 30 min" | |
| "Show me bots crawling us this week" | Build the "Bot traffic breakdown" insight above with |
| "How much is GPTBot hitting us?" | Build the "Single bot drill-down" insight, set |
| "Why is the live tab showing X but my dashboard shows Y?" | The live tab is a 30-min sliding window over events; dashboards aggregate over the picked range. They are not directly comparable beyond the last 30 min. |
| "Add a date range to the live tab" | The Live tab has no date picker — for ranges, build a Trends insight using the patterns above |
| "Filter live traffic by browser / device / country" | Not supported — only the host filter exists. Build a Trends insight with the relevant breakdown + filter instead |
| 用户问题 | 应对方案 |
|---|---|
| “网站现在发生了什么?” | 引导用户访问 |
“将实时流量筛选为 | 引导用户使用 |
| “展示过去30分钟内抓取我们网站的机器人” | 引导用户查看 |
| “展示本周抓取我们网站的机器人” | 构建上述“机器人流量细分”洞察,设置 |
| “GPTBot访问我们网站的频率有多高?” | 构建“单个机器人钻取分析”洞察,将 |
| “为什么Live标签页显示X,但我的仪表板显示Y?” | Live标签页基于30分钟滑动窗口的事件数据;仪表板基于所选时间范围的汇总数据。除过去30分钟外,两者无法直接比较。 |
| “给Live标签页添加日期范围选择器” | Live标签页没有日期选择器——如需查看指定时间范围数据,请按照上述模式构建Trends洞察 |
| “按浏览器/设备/国家/地区筛选实时流量” | 不支持该功能——仅主机筛选器可用。请构建包含对应细分维度+筛选器的Trends洞察替代 |
Gotchas
注意事项
- Bot virtual properties () only exist on events processed by the bot classification step. They are not retroactive — events from before the classifier shipped will not have them. Keep
$virt_*within the last few months for reliable bot results.dateRange.date_from - events come from server-side log capture, not from
$http_log. If a project does not emitposthog-js, bots that don't run JS (most crawlers) will be invisible to the bot tiles.$http_log - The 30-minute window is a sliding aggregation over an in-memory buffer in the browser — refreshing the page replays the backfill HogQL, not the SSE stream. Do not interpret a brief "0" right after page load as a real drop.
- The host filter strips the protocol — pass , not
example.com.https://example.com - Tile order is persisted per-team in (under feature flag
localStorage). If a user's layout looks different from yours, it is not a bug.WEB_ANALYTICS_LIVE_EDIT_LAYOUT
- 机器人虚拟属性()仅存在于经过机器人分类步骤处理的事件中。不具有回溯性——分类器上线前的事件不会包含这些属性。为确保机器人分析结果可靠,请将
$virt_*设置为最近几个月内。dateRange.date_from - 事件来自服务端日志捕获,而非
$http_log。若项目未生成posthog-js,则不运行JS的机器人(大多数爬虫)将不会在机器人卡片中显示。$http_log - 30分钟窗口是浏览器内存缓冲区中的滑动聚合——刷新页面会重新执行HogQL回填,而非重播SSE流。请勿将页面加载后短暂出现的“0”视为真实流量下降。
- 主机筛选器会去除协议——请传入,而非
example.com。https://example.com - 卡片顺序通过特性标志按团队保存在
WEB_ANALYTICS_LIVE_EDIT_LAYOUT中。若用户的布局与你的不同,这不是Bug。localStorage