ga4-reports
Skill2 starsChanged 23 days agoMITView on GitHub
Pull and explain Google Analytics 4 reports — traffic by source and channel, period comparisons, daily breakdowns, conversion events, signup and purchase funnels — through the GA4 MCP server, with a REST fallback when the MCP hangs. Knows the GA4 reporting traps (cross-day attribution, users vs events, Ads vs GA date mismatch). Use when someone asks about website traffic, GA4, sessions, conversions, funnel drop-off or channel performance. Triggers: "pull GA4", "traffic last month", "conversions by source", "funnel report", "Google Analytics".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- tymoshenko-dmytro/claude-marketing-skillsword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- tymoshenko-dmytro/claude-marketing-skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository19 other files it gives its agents.
- ads-parserSkill
- ads-video-librarySkill
- ahrefsSkill
- competitor-researchSkill
- connectSkill
- funnel-screenshotsSkill
- gsc-insightsSkill
- image-genSkill
- parallel-researchSkill
- plain-copySkill
- seoSkill
- seo-tech-auditSkill
- video-3dSkill
- video-buildSkill
- video-checkSkill
- video-generatedSkill
- video-movesSkill
- video-soundSkill
- video-studioSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
If a call fails with Reauthentication is needed, 401 or invalid_grant, the login expired.
- Very specific: line 22
Wait for the command to finish, then retry.
- Very specific: line 24
If Google says "This app is blocked", the default gcloud client is blocked for these scopes on the user's Workspace — the fix (your own …
- Very specific: line 77
If the MCP's run_report times out (504 Deadline Exceeded) while lighter tools work, or the server isn't connected: don't debug the MCP — …
- Distinctive: line 88
Reconcile with the ad platform: when the user has it. Google Ads and GA4 mostly agree, with ±1–2 a day of difference: Ads attributes a …
- Distinctive: line 91
Today and yesterday are incomplete: If the last days dip, note it in one line under the table, not as a finding.
- Distinctive: line 99
If you need the same report every week, ask the agent to write it as a script once and run the script on a schedule.
≈ “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
GA4 reports
Reports from Google Analytics 4 through the official GA4 MCP server (mcp__google-analytics__* or similar tools), or through scripts/ga4.py when the MCP is broken. Both use the same Google login and the same query JSON.
Setup (one time): connections/ga4-mcp.md, or run the connect skill.
Before the first report: know the funnel
GA4 data is only as useful as your event map. Read references/funnel-map.md. If the user's copy is still the template, ask them for their key events (or list the events from the last 30 days by eventName and ask which ones matter), then fill it in and save it. Do this once; every later report uses it.
Auth
The MCP and the script both use Google Application Default Credentials.
- If a call fails with
Reauthentication is needed,401orinvalid_grant, the login expired. Run the login fromconnections/ga4-mcp.mdin the background (it opens a browser) and tell the user: "A browser window opened — sign in with the Google account that has GA4 access." - Wait for the command to finish, then retry. Check with the account-summaries tool or
python3 ${CLAUDE_SKILL_DIR}/scripts/ga4.py --list-properties.
If Google says "This app is blocked", the default gcloud client is blocked for these scopes on the user's Workspace — the fix (your own OAuth client) is in connections/ga4-mcp.md.
Running reports
The rules the API enforces
dimensionsis always required — the API errors without it.date_rangeis not a dimension.- For people counts use
totalUsers(unique users), noteventCount(raw events), unless the user asks for events.
Period comparison
{
"dimensions": ["month"],
"date_ranges": [
{"start_date": "2026-03-01", "end_date": "2026-03-31", "name": "march"},
{"start_date": "2026-02-01", "end_date": "2026-02-28", "name": "february"}
],
"metrics": ["sessions", "totalUsers", "newUsers", "engagedSessions", "averageSessionDuration", "conversions"]
}GA returns rows for both ranges — drop zero-value rows for a clean table.
Daily breakdown
{
"dimensions": ["date"],
"date_ranges": [{"start_date": "28daysAgo", "end_date": "yesterday"}],
"metrics": ["sessions", "totalUsers"],
"order_bys": [{"dimension": {"dimension_name": "date"}, "desc": false}]
}One source or channel
{"dimension_filter": {"filter": {"field_name": "sessionSource",
"string_filter": {"match_type": "CONTAINS", "value": "linkedin", "case_sensitive": false}}}}{"dimension_filter": {"filter": {"field_name": "sessionDefaultChannelGroup",
"string_filter": {"match_type": "EXACT", "value": "Paid Search"}}}}Funnel steps
Query eventName with totalUsers, filtered to the events in your funnel map (in_list_filter), then compute step-to-step conversion yourself.
REST fallback
If the MCP's run_report times out (504 Deadline Exceeded) while lighter tools work, or the server isn't connected: don't debug the MCP — switch to the script. It's usually 1–2 seconds per query.
python3 ${CLAUDE_SKILL_DIR}/scripts/ga4.py --property <PROPERTY_ID> query.json --out raw/ga4/<name>.jsonIt accepts the same snake_case JSON as the MCP, prints a table and saves the raw response. Property id from --property or the env var GA4_PROPERTY_ID. Several queries → run them sequentially in one Bash call.
Reporting rules
- Lead with the configured conversion events (form submitted, meeting booked, purchase), not raw step-view events. A funnel built from page views and CTA clicks looks alarming ("87 opened the form, 11 passed step one — the form is broken") when the real conversions are fine. Curiosity clicks are not failures.
- Reconcile with the ad platform when the user has it. Google Ads and GA4 mostly agree, with ±1–2 a day of difference: Ads attributes a conversion to the click date, GA4 logs it on the event date. Say this before anyone calls it a tracking bug.
- Cross-day steps can exceed 100%. A user can open a page on Monday and convert on Tuesday, so within a date range step B / step A can be over 100%. Mark it with an asterisk; don't "fix" the number.
- Don't compute lagging conversions inside one period (trial → first payment, lead → deal). The numerator and the denominator are different people. That needs a cohort view — say so instead.
- Today and yesterday are incomplete. If the last days dip, note it in one line under the table, not as a finding.
- Combine split sources. LinkedIn arrives as
linkedinandlinkedin.com; Facebook as several sources. Sum them and say you did. averageSessionDurationis in seconds. Money metrics follow the property currency.- Answer exactly what was asked. No "insights", "next steps" or extra channel overviews unless requested.
Adapt it
- Fill in
references/funnel-map.md— it turns this skill from generic into yours. - If you need the same report every week, ask the agent to write it as a script once and run the script on a schedule. A stable report doesn't need an agent every time.
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.

