ga4-source-of-truth
Skill15 starsChanged 39 days agoMITView on GitHub
Use for any GA4 query whose result will be reported back to the user. Covers conversions ≠ transactions distinction, channel-subset-sum trap with sessionDefaultChannelGroup, intraday partial-data discipline, Paid Social aggregation rules, API-vs-UI attribution mismatch.
In this repository61 other files it gives its agents.
- access-and-permissionsSkill
- accounts-and-connectionsSkill
- ad-brief-generatorSkill
- affiliate-marketingSkill
- analyse-creativeSkill
- automate-with-agentsSkill
- brief-creativeSkill
- build-reportsSkill
- clean-wasted-spendSkill
- competitor-ad-intelligenceSkill
- creative-psychology-hooksSkill
- creative-researchSkill
- diagnose-performanceSkill
- email-marketingSkill
- get-startedSkill
- gomarble-skills-creative-strategistsSkill
- gomarble-skills-ecommerce-brandsSkill
- gomarble-skills-google-ads-auditSkill
- gomarble-skills-meta-ads-auditSkill
- gomarble-skills-saas-companiesSkill
- google-ads-create-master-skillSkill
- google-ads-depth-of-analysisSkill
- google-ads-guardrailsSkill
- google-ads-keywordplannerSkill
- google-ads-pmax-evaluationSkill
- google-ads-pmax-scalingSkill
- google-ads-search-analysisSkill
- google-ads-search-executionSkill
- google-ads-shoppingSkill
- google-ads-tool-fundamentalsSkill
- google-impression-shareSkill
- google-pmax-pulseSkill
- google-search-auditSkill
- google-search-term-auditSkill
- launch-campaignsSkill
- linkedin-adsSkill
- manage-campaignsSkill
- meta-ads-auditSkill
- meta-agent-operationsSkill
- meta-create-master-skillSkill
- meta-creative-analysisSkill
- meta-creative-fatigue-detectionSkill
- meta-creative-strategySkill
- meta-custom-event-interpretationSkill
- meta-daily-optimizationSkill
- meta-depth-of-analysisSkill
- meta-guardrailsSkill
- meta-performance-analysisSkill
- meta-tool-fundamentalsSkill
- microsoft-adsSkill
- organic-socialSkill
- own-creative-diagnosisSkill
- research-competitorsSkill
- search-console-master-skillSkill
- shift-budgetSkill
- shopify-order-disciplineSkill
- tiktok-adsSkill
- tiktok-create-master-skillSkill
- winning-ads-engineSkill
- winning-ads-orchestratorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Before any GA4-derived figure goes to the user:
- Distinctive: line 39
Never sum a paid-channel subset and report as total or as the blended-ROAS denominator.
- Very specific: line 51
Never report Paid Social GA4 revenue as "Meta revenue" or "Facebook revenue".
- Distinctive: line 61
If the date range includes today / last 24h: flag the period as partial.
- Very specific: line 69
When the user says *"GA4 shows {X}, you're showing {Y}"* and the gap is plausibly attribution-driven (small / medium %, all channels …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Outside the GoMarble app. This methodology is GoMarble's own, kept in sync with the GoMarble connector.
- GoMarble connector tools for this skill:
google_analytics_list_properties,google_analytics_run_report,google_analytics_get_traffic_sources,google_analytics_get_events,google_analytics_get_page_views,google_analytics_get_user_behavior,google_analytics_get_device_metrics,google_analytics_get_active_users.
GA4 Source-of-Truth
Before any GA4-derived figure goes to the user:
- Purchase volume → use
transactionsoreventName=purchase. Never the genericconversionsaggregate. - Total revenue / sessions / anything → query WITHOUT
sessionDefaultChannelGroup. Summing paid-channel rows ≠ business total. - Date range includes today / last 24h → flag the period as partial. Don't frame as decline / trend.
- Number differs from GA4 UI → check
attributionModel. API defaults to last-click; UI is often data-driven.
Rule 1 — conversions ≠ transactions
| Field | Counts |
conversions | Every event marked as a conversion: add_to_cart, begin_checkout, sign_up, view_item, scroll, custom events, purchase. |
transactions (or eventName=purchase) | Actual purchase events. |
For revenue / orders / sales-count, use transactions. State the field used: "Using transactions (purchase events); conversions would include AddToCart / Sign-Up / etc."
Rule 2 — Channel-Dimension Subset-Sum Trap
sessionDefaultChannelGroup partitions revenue across: Direct, Organic Search, Organic Social, Email, Referral, Affiliates, SMS, Cross-network, Paid Search, Paid Social, Paid Shopping, Paid Video, Paid Other, Display, Audio, (Other), Unassigned. All contribute to total revenue.
- Business total → SEPARATE query, NO channel dimension.
- Total + breakdown → TWO queries. State both.
- Never sum a paid-channel subset and report as total or as the blended-ROAS denominator.
Forbidden: "Total GA4 revenue: {X}" where {X} is a paid-channel subset · "Blended ROAS = spend / GA4 paid revenue" · "Critical Alert" headlines on a paid-subset denominator.
Rule 3 — Paid Social ≠ Meta
Paid Social aggregates Meta + TikTok + Snap + Pinterest + LinkedIn + X + Reddit.
To isolate Meta: sessionSource = "facebook.com" or sessionSourceMedium = "facebook / cpc" (or the merchant's actual Meta UTM pattern).
Never report Paid Social GA4 revenue as "Meta revenue" or "Facebook revenue".
Rule 4 — Intraday Partial-Data
- GA4 has documented intraday processing lag — events take hours to appear in standard reports.
realtimeAPI ≠ standard reports. Don't substitute one for the other.- Conversion attribution backfills 48–72h (more when data-driven attribution is active).
If the date range includes today / last 24h: flag the period as partial. Never recommend pause / scale-down / archive on partial-day data alone.
Rule 5 — Attribution-Model API/UI Mismatch
API defaults to last-click. UI is often data-driven or paid-and-organic last-click. Numbers WILL differ when models differ — this is not a tracking bug.
When the user says "GA4 shows {X}, you're showing {Y}" and the gap is plausibly attribution-driven (small / medium %, all channels affected proportionally):
- Pass an explicit
attributionModelparameter to match the UI. - State the model in the response: "Used last-click attribution (API default); your GA4 UI may be set to data-driven, which can shift values 5–15%."
Examples
Total revenue MTD
❌ dimensions=[sessionDefaultChannelGroup] → sum (Paid Social + Paid Search + Cross-network) → report the partial sum as the total.
✅ Query 1: no dimensions → total {T}. Query 2: same date range with sessionDefaultChannelGroup → channel breakdown. Report both: "GA4 total revenue MTD: {T} (unfiltered). Channel breakdown: Direct {D}, Organic {O}, Paid Social {PS} (includes Meta + TikTok + Snap — for Meta only, query sessionSource='facebook.com'), Paid Search {PSe} ..."
User asks why GA4 conversions are much higher than the platform's purchase count
❌ "Tracking discrepancy. The platform pixel may be missing events; you should audit pixel firing."
✅ "conversions in GA4 counts every event configured as a conversion in your property — AddToCart, Sign-Up, Lead, Purchase. Re-querying with eventName='purchase' so we're comparing apples to apples with the platform's Purchase event." (then issues the query)
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.

