Google analytics
Query Google Analytics 4 (GA4) reports via the Analytics Data API v1 and list properties via the Admin API. Use when the user mentions Google Analytics, GA4, website traffic / sessions / users, top pages or sources, conversions, or a realtime report.From its SKILL.md
npx -y skills add AceDataCloud/Skills --skill google-analyticsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.9 KB, 643 tokens by cl100k_base, as published. Nobody here has run it
Query Google Analytics 4 via curl + jq. The user's OAuth bearer token is in
$GOOGLE_ANALYTICS_TOKEN (scope analytics.readonly); every call needs
Authorization: Bearer $GOOGLE_ANALYTICS_TOKEN. Two APIs: the Admin API
(analyticsadmin.googleapis.com/v1beta) to discover properties, and the Data
API (analyticsdata.googleapis.com/v1beta) to run reports.
Failures are {"error":{"code","message","status"}} — show verbatim. 401 =
re-install.
AUTH="Authorization: Bearer $GOOGLE_ANALYTICS_TOKEN"
# List the GA4 properties the user can access (via their account summaries)
curl -sS -H "$AUTH" "https://analyticsadmin.googleapis.com/v1beta/accountSummaries" \
| jq '.accountSummaries[]?.propertySummaries[]? | {property, displayName}'
property looks like properties/123456789 — the number is the PROPERTY_ID.
Run a report
PID="123456789"
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" -d '{
"dateRanges":[{"startDate":"28daysAgo","endDate":"today"}],
"dimensions":[{"name":"pagePath"}],
"metrics":[{"name":"screenPageViews"},{"name":"activeUsers"}],
"orderBys":[{"metric":{"metricName":"screenPageViews"},"desc":true}],
"limit":10
}' "https://analyticsdata.googleapis.com/v1beta/properties/$PID:runReport" \
| jq '.rows[] | {page: .dimensionValues[0].value, views: .metricValues[0].value, users: .metricValues[1].value}'
Swap dimensions/metrics for other reports: sessionDefaultChannelGroup +
sessions (acquisition), country + activeUsers (geo), eventName +
eventCount / conversions (events). Dates accept NdaysAgo, today,
yesterday, or YYYY-MM-DD.
Realtime
curl -sS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d '{"dimensions":[{"name":"country"}],"metrics":[{"name":"activeUsers"}]}' \
"https://analyticsdata.googleapis.com/v1beta/properties/$PID:runRealtimeReport" | jq '.rows'
Gotchas
- This is GA4 only (Data API v1). Old Universal Analytics (UA) is shut down —
don't use the legacy
analytics/v3endpoints. - Valid dimension/metric API names matter (
screenPageViews, not "Pageviews"). If a name 400s, it's the wrong API id — check the GA4 dimensions & metrics list. - Reports are capped by
limit(default 10k rows); page withoffset.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most analytics metrics skills give in 643 tokens
Counted across 333 of the 342 authors here whose files we hold, read 2026-09-06
- Read product marketing context before asking questionsin 37 of 333, across 16 files
- Test one variable at a timein 26 of 333, across 11 files
- Pre-determine sample size before launchin 24 of 333, across 16 files
- Verify tracking and QA variants before launchin 17 of 333, across 8 files
- Monitor for technical issues during the testin 14 of 333, across 6 files
- Match each save offer to the cancel reasonin 14 of 333, across 5 files
- Start every test with a specific hypothesisin 14 of 333, across 7 files
- Keep the continue-cancelling option visiblein 13 of 333, across 4 files
- Document every test with hypothesis, variants, results, and learningsin 13 of 333, across 6 files
- Gather churn, billing, product, usage, and constraint context firstin 12 of 333, across 3 files
- Build a health score from weighted signalsin 12 of 333, across 3 files
- Retry soft declines 3-5 times over 7-10 daysin 12 of 333, across 3 files
Said here and by no other author read
- Send Authorization bearer header on every call
- List properties via Admin API accountSummaries
- Run reports via Data API runReport
- Run realtime queries via runRealtimeReport
- Show API error responses verbatim
- Treat 401 as requiring re-installation
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.