ga4-measurement-verifier
Check expected GA4 event names and counts against a realtime report receipt, preserving row coverage, minute-window and deployment-timing limits. Use when…
от jeremylongshore★ 2 961 звезда на GitHub
Установить ga4-measurement-verifier в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
GA4 Measurement Verifier
Overview
Determine which expected event names/counts are present in a supplied realtime receipt and whether its time window can support a post-deployment observation. Produce an evidence ledger without treating an empty response as an outage or a matching event name as end-to-end tracking certification.
Prerequisites
- The numeric target property ID, its Standard/360 tier, expected event names and explicit minimum counts for this observation. Do not invent universal success thresholds from aggregate traffic.
- A matching raw realtime request/response, client request/response timestamps and, for deployment attribution, the deployment time and a documented clock-skew bound.
- Python 3.10+. The bundled analyzer uses only the standard library; it performs no provider calls and reads no credential store.
Use existing authorized property access to collect missing evidence when available. If the account, property or collection scope is unclear, establish it first. Building or running this local analyzer does not authorize synthetic events, tracking changes, credential creation or a production deployment.
Instructions
1. Define the observation
Name the property, expected event and period. For a deployment check, record the actual deployment timestamp. Separate a controlled test event from ordinary user traffic; the realtime API's aggregate event count cannot prove which deployment or person generated an event.
Do not infer revenue by multiplying purchase-event counts by an assumed order value. This workflow evaluates event names/counts, not purchases, payload fields, consent correctness, ordered journeys or transaction deduplication.
2. Prepare a bounded receipt
Read the receipt contract. Preserve the original
response and record how the HTTP target was normalized into request.property.
The supported request uses only the eventName dimension and eventCount metric,
one minute range and no filters or metric aggregation. Other shapes are held
rather than guessed into this contract.
Standard properties support up to the last 30 minutes; 360 properties can request up to 60. The default range is the last 30 minutes even for 360. Multiple ranges can overlap and count the same events twice; the analyzer rejects them instead of summing overlapping rows. See Google's realtime method.
The response does not have Core-report quality metadata. Do not fabricate sampling or thresholding fields from the historical reporting workflow.
For an authorized live observation, the optional collector makes one request for
the last 30 minutes with at most 10,000 rows, a 20-second RPC timeout and no
automatic retries. It uses existing Application Default Credentials with the
Analytics read-only scope; it does not create keys or grant permissions. Resolve
its installed path before execution. Without --live, it holds before SDK import
or credential discovery. Supply this plan on stdin:
{"property_id":"123456789","property_tier":"standard","expected_events":[{"name":"purchase","minimum_count":1}],"deployment_at":null,"clock_uncertainty_seconds":null}
python3 "${CLAUDE_SKILL_DIR}/scripts/collect.py" --live < observation-plan.json > realtime-receipt.json
The optional dependency is google-analytics-data; obtain it through the approved
local environment. The collector records client timestamps and explicitly labels
protobuf default normalization and any response kind derived from the typed RPC.
It closes its transport and does not poll. Authentication setup may take time
separately from the RPC timeout. A truncated report stays incomplete. Receipts
contain event names and business analytics: redirect only to an approved path.
Development fixtures do not contact a property or discover credentials.
3. Execute the verifier
python3 "${CLAUDE_SKILL_DIR}/scripts/verify.py" realtime-receipt.json > ga4-measurement-verification.json
Input is limited to 2 MiB. The script checks property binding, request shape, response kind/headers, timestamps, row coverage and duplicate event rows. It emits only the expected event names and their observed counts; it does not print all unrelated event rows from the input.
Use a new or approved output path. Both the input and output are business analytics and should remain in the operator's approved local workspace.
4. Interpret evidence states
| State | Supported conclusion |
|---|---|
observed |
This receipt contains at least the caller's expected count. |
below-expectation |
A supplied row's count is below that explicit expectation. |
not-observed-in-receipt |
The event is absent from the complete supplied result. Its count is unknown, not an invented zero. |
inconclusive |
An absent event cannot be evaluated because row coverage is i |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Bash(python3:*)
Вложенные файлы
- eval-spec.yaml
- references/diagnosis-guide.md
- references/receipt-contract.md
- scripts/collect.py
- scripts/verify.py
FAQ
Что делает скилл ga4-measurement-verifier?
Check expected GA4 event names and counts against a realtime report receipt, preserving row coverage, minute-window and deployment-timing limits. Use when verifying tracking after a deployment or investigating missing events. Trigger with "did GA4 receive sign_up?", "check GA4 tracking after deploy" or "missing GA4 events".
Как установить скилл ga4-measurement-verifier?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ga4-measurement-verifier запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…