ga4-audit
Skill0 starsChanged 6 months agoMITView on GitHub
Full GA4 account audit with parallel agent delegation. Profiles the property's live site for vertical and platform context, runs data-quality and event-taxonomy gates, then fans out funnel, segments, conversions, attribution, and property-configuration agents. Findings can include unverified heuristic comparisons and rendered to markdown, HTML, or PDF. Use when user says 'audit', 'full analysis', 'analyze my GA4', 'account health check'.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cognyai/claude-code-marketing-skillstheir own version, first seen Oct 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- cognyai/claude-code-marketing-skills★ 106same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ga4-audiencesSkill
- ga4-contextSkill
- ga4-custom-defsSkill
- ga4-custom-reportSkill
- ga4-events-editSkill
- ga4-eventsSkill
- ga4-funnelSkill
- ga4-key-eventsSkill
- ga4-segment-defsSkill
- ga4-segmentsSkill
- ga4Skill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Conditionally spawn
ga4-attribution: if at least one key event is configured. - Distinctive: line 95
Every recommendation inherits the confidence label from ga4-quality:
- Very specific: line 147
Read the selected reporting identity with python scripts/ga4_admin.py --property X --reporting-identity --json or MCP …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Full GA4 Audit
Process
- Verify auth:
python scripts/ga4_auth.py --check - Fetch property summary:
python scripts/ga4_admin.py --property <id> --details --json - Run
ga4-context, thenga4-qualityandga4-propertyin parallel.ga4-contextprofiles the live site (vertical, platform, framework, sitemap shape) and saves the result under~/.claude/ga4-context/<id>.json.ga4-qualityproduces the data-confidence label.
- Spawn
ga4-eventsas the second gate, using the built-in parameter checks; custom required-parameter tables are not implemented. - Fan out the remaining agents in parallel:
ga4-funnel(with--funnel-stepsif supplied, or with steps the events agent confirmed)ga4-segmentsga4-conversions
- Conditionally spawn
ga4-attributionif at least one key event is configured. - Collect every agent's JSON output and write each to a temp file under
/tmp/. - Render the unified report via
python scripts/ga4_report.pywith--format mdby default. The renderer attaches the property context section, the data-confidence label, and benchmark verdicts (fromscripts/ga4_benchmarks.py) to every finding that declares ametric/metric_valuepair.
Agent Dispatch
Context, then parallel checks:
1. Agent: ga4-context — "Profile property <id>"
2a. Agent: ga4-quality — "Audit data quality for property <id>"
2b. Agent: ga4-property — "Audit property configuration"Sequential after gates:
2. Agent: ga4-events — "Validate event taxonomy for property <id>"Parallel after events:
3. Agent: ga4-funnel — "Analyze the funnel for property <id>"
4. Agent: ga4-segments — "Break down funnel drop-off by cohort"
5. Agent: ga4-conversions — "Audit key events configuration"Conditional:
7. Agent: ga4-attribution — "Analyze attribution at each funnel step"
Spawn only if ga4-conversions reports at least 1 key event configuredBenchmark vertical
The vertical used for benchmark enrichment is, in priority order:
- The
--verticalCLI flag if supplied. - The inferred vertical from
ga4-context(read from~/.claude/ga4-context/<id>.json→site.inferred.vertical). other(the generic heuristic fallback).
Available verticals: ecommerce, saas, media, lead_gen, finance, travel,
education, nonprofit, other. See python scripts/ga4_benchmarks.py
--list-verticals.
Default Parameters
- Date range: 28 days (events: 7 days)
- Output format: markdown (
--format md) saved to./ga4-audit-<id>-<YYYYMMDD>.mdunless--outputis supplied - Funnel steps: if
--funnel-stepsis not supplied, the funnel agent proposes a funnel based on which events fire (the e-commerce preset is suggested when the recommended ecomm events are present)
Output: markdown by default
The unified report is rendered by scripts/ga4_report.py. The markdown
template has no emoji and includes:
- Header - property ID, generation timestamp, confidence label, benchmark vertical
- Property Context - homepage status, inferred vertical / platform / framework, language, SPA-vs-MPA, sitemap-derived page-type inventory
- Executive Summary - one bullet per agent
Action Plan - findings grouped by severity (Critical / High / Medium / Low). Each finding shows source agent and benchmark band where applicable, e.g.
Bounce rate above the heuristic upper band (source: ga4-quality) (value 0.74, vertical ecommerce, p25 0.35 / p50 0.45 / p75 0.58, band above_p75, interpretation critical; unverified heuristic)
- Per-Agent Output - each agent's summary + raw JSON in a collapsed
<details>block
To export HTML or PDF instead, pass --format html or --format pdf.
Confidence Inheritance
Every recommendation inherits the confidence label from ga4-quality:
- Confidence High: the sampled checks passed; validate recommendations against property goals
- Confidence Medium: findings should be verified with raw event sampling before action
- Confidence Low: findings are directional only; recommend BigQuery export or fix data quality first
How agents should emit benchmarkable findings
For any finding the agent wants benchmarked, include a metric name and
a metric_value (float):
{
"severity": "High",
"title": "Bounce rate above the heuristic upper band",
"detail": "...",
"metric": "bounce_rate",
"metric_value": 0.74
}The reporter calls ga4_benchmarks.compare() and appends the band /
interpretation automatically. Findings without a metric just print
without a benchmark annotation - that's fine for qualitative findings.
Error Handling
| Scenario | Action |
| Auth token expired | Report error, guide user to re-authenticate via gcloud ADC |
| Context fetch fails (homepage 4xx/5xx) | Continue with vertical = other, note in the report |
| Quota exceeded (429) | Back off per Data API quota tier, report partial results |
| No funnel events fire | Skip funnel and segments agents, return ga4-property and ga4-quality findings only |
| Post-payment heuristic positive (opt-in) | Degrade funnel by one step, flag in Critical findings |
| Agent timeout | Report findings from completed agents, note incomplete sections |
Property retention is read from getDataRetentionSettings. Enhanced
measurement recognizes the API's snake_case web-stream fields. Data filters
and Search Console links return status: unsupported: inspect these in GA4
Admin, and never interpret an unavailable check as an empty configuration.
Quality output includes checks_complete and incomplete_checks. Failed or
empty checks cap confidence at low; a measured zero sample rate stays zero.
ga4_data.py --include-metadata retains available thresholding, empty-result,
restriction and truncation details. A thresholding flag alone does not prove
that rows were removed. New metadata fields depend on the installed SDK.
Benchmark tables and comparisons are labeled source_status: unverified_heuristic.
Their p25/p50/p75 names are legacy band labels, not verified population
percentiles. Do not present them as evidence of industry performance or use
them alone to set severity. See the source review.
Read the selected reporting identity with
python scripts/ga4_admin.py --property X --reporting-identity --json
or MCP reporting_identity(property_id). This alpha read uses the 15-minute
cache and response scrubber. Older SDKs without the method return
status: unsupported. Report the selected mode as context for user counts;
there is no identity write or universal recommendation to switch modes.
Read operations share a 100-request budget, including retries and Admin pages; a full audit shares it across workers. Python callers can use ga4_transport.read_budget(max_requests=N), with N from 1 to 1000. Transient reads have at most three attempts with a 30-second RPC timeout and GAPIC retries disabled. Auth, permission and quota failures are not retried. CLI/MCP and partial Admin errors expose stable categories; partial failures are not successful checks or cached results. Admin writes do not use this retry helper.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

