analytics-tracking-testing

仓库创建 2026年3月24日最近提交 1 个月前SkillHot 收录 2 天前
▸ 精选理由

直接验证网络请求与上报字段,能发现浏览器级检测看不到的埋点问题。

▸ 风险提示

拦截真实埋点可能捕获用户敏感数据,使用时注意数据脱敏与权限

这个 Skill 做什么

拦截并校验 GA4/GTM、像素和广告埋点的真实 Beacon 和 dataLayer 数据。

拦截并校验真实的埋点网络 beacon(GA4/GTM、Meta/TikTok/LinkedIn 像素等),保证事件名、参数、时序和去重都正确无误。常用在 QA、CI 回归或埋点验收时,用 Playwright 等工具抓真实请求并断言 dataLayer 与后端到达情况。把跟踪计划当合同来测试,能发现浏览器里看着正常但实际上没发出去或参数错的情况。

▸ 展开 SKILL.md 英文原文

Validate that analytics and marketing tracking fire CORRECTLY: GA4/GTM dataLayer events, Meta/TikTok/LinkedIn pixels, and ad-tech tags. Covers building a tracking plan as the contract, intercepting collect-endpoint beacons and dataLayer.push in Playwright, asserting event name + params + values + timing + de-duplication, Consent Mode v2 gating, CI regression gating, and news-media events (article-view, scroll-depth, paywall). Use when: "test analytics tracking," "GA4 event test," "verify the pixel fires," "dataLayer test," "tracking plan," "Meta Pixel dedup," "scroll-depth tracking test," "gate tracking in CI." Not for: whether tracking is ALLOWED to fire under consent law (GDPR/CMP) — that is compliance-testing; this skill checks the data is CORRECT. SEO meta tags / structured data — out of scope. Related: compliance-testing, playwright-automation, api-testing, qa-project-context.

开发编程埋点校验前端测试网络拦截通用
47
Stars
10
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/analytics-tracking-testing/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/analytics-tracking-testing/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
<objective>
Tracking that "looks fine" in GA4 DebugView still drops events silently after a refactor, sends the wrong currency, or double-counts a purchase. Reading `window.dataLayer` or asserting the button is `toBeVisible()` proves nothing — the beacon may never leave the browser. This skill makes you intercept the real network beacon (`google-analytics.com/g/collect`, `facebook.com/tr`, `analytics.tiktok.com`, `px.ads.linkedin.com`), parse the event name and parameters out of the request, and assert them against a tracking plan that is a typed contract — then gate that contract in CI so a dropped event fails the build.
</objective>

## Quick Route

| Situation | Go to |
|-----------|-----
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有