exploring-live-traffic
它能做什么
这项技能让智能体读取 PostHog 的实时(Live)标签页,它显示实时的网站活动。适合想了解当前网站正在发生什么的网站所有者。
适用场景
- ✓当你询问现在谁在你的网站上,或者正在实时发生什么的时候。
- ✓当你想查看此刻哪些机器人正在抓取你的网站的时候。
- ✓当你想把实时数据与更长的时间范围进行对比的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/web_analytics/skills/exploring-live-traffic/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“现在谁在我的网站上?他们在看哪些页面?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取最近 30 分钟的实时窗口,以及过去 60 秒内在线用户的数量。如果需要更长的历史数据,它会在 PostHog 中建立定期报告,而不是使用实时视图。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Exploring Web analytics live traffic
The Web analytics Live tab (/web/live) 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.
This 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.
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).
Tab structure
URL: /web/live
The 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).
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
/webpropagates to/web/liveand vice-versa. - It is gated by feature flag
WEB_ANALYTICS_LIVE_DOMAIN_FILTER. If the flag is off, no host filter UI is rendered and all tiles show data across every domain. - 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 <host>", 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 localStorage via webAnalyticsFilterLogic.
Stat 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 | $pageview count in the last 30 min |
30m |
Content cards
| Card | What | Notes |
|---|---|---|
| Active users per minute | Bar chart, new vs returning visitors | last 30 min |
| Top pages | Animated leaderboard, $pathname + view count |
top 10, 30 min |
| Top referrers | Animated leaderboard, $referring_domain |
top 10, 30 min |
| Devices | Breakdown bars, $device_type |
top 6 + Other |
| Browsers | Breakdown bars with logos, $browser |
top 6 + Other |
| Top co |
常见问题
实时标签页覆盖多长时间?
它覆盖一个滚动的 30 分钟窗口,并统计过去 60 秒内在线的用户数。
智能体可以运行自定义的实时查询吗?
不可以。实时标签页不是查询工具,因此要查看历史数据,智能体会建立一个常规分析图表。
我可以筛选实时流量吗?
可以,按域名或主机筛选,这是实时标签页提供的唯一筛选方式。
详情
作者的原始描述
Inspects PostHog Web analytics Live tab data — current users online, last-30-minutes pageviews, top pages, referrers, devices, browsers, countries, bot traffic, and the per-minute bot/users charts. Use when the user asks "who is on my site right now?", "what is happening live?", "what bots are crawling me?", asks about the "live tab" / "live dashboard", wants live numbers (last 30 min), or wants help filtering or drilling into the live view. Also covers building product-analytics insights that mirror what the tiles show.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6974
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。