analytics-tracking-testing
直接验证网络请求与上报字段,能发现浏览器级检测看不到的埋点问题。
拦截真实埋点可能捕获用户敏感数据,使用时注意数据脱敏与权限
拦截并校验 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.
帮我安装这个 skill:https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/analytics-tracking-testing/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/analytics-tracking-testing/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 | |-----------|-----