Google / skills/analytics/google-analytics-data-api-basics/SKILL.md
Google Analytics Data API Basics
Sets up and runs Google Analytics 4 reports through the Data API v1beta, with read-only scopes and a field compatibility check.
Source reviewed · reviewed · Named sources were inspected. No runtime results are established by this label.
01 / Task fit
Where it may help.
These are intended uses indicated by the upstream material. They are not measured outcomes.
- Scripted GA4 reports
- Checking metric and dimension combinations before building a report
What it is
This skill covers enabling the Google Analytics Data API with the gcloud CLI, signing in with Application Default Credentials and a read-only Analytics scope, and running reports with the official client libraries. It lists common dimensions and metrics and shows how to check that a set of fields can be queried together.
Why you might use it
Use it when you want an agent to pull GA4 numbers into a script or report instead of copying them from the interface. It's developer-oriented: you need a Google Cloud project and a language runtime.
Put it in context.
Illustrative requests and outputs to review. These examples are separate from the recorded evaluation below.
Weekly traffic by source
Example request
Write a Python script that reports sessions and key events by session source for the last 7 days on property 123456, and print a table.
What to look for. A runnable script using the Data API client and a table of results.
Before you rely on it. Check the totals against the GA4 interface. Sampling, thresholds and date ranges can make them differ.
Check field compatibility
Example request
Before building the report, check that itemName, activeUsers and totalRevenue can be queried together.
What to look for. A compatibility result for each field.
Before you rely on it. Compatibility doesn't mean the numbers mean what you expect. Define each metric first.
02 / Setup & access
What it asks of your environment.
Requirements
- A Google Cloud project with the Analytics Data API enabled, the gcloud CLI, and access to the GA4 property.
- A language runtime and client library (Python, Node.js, Java, PHP, Go, .NET or Ruby).
Permissions & data access
- Enables an API in your Google Cloud project and creates local Application Default Credentials.
- Reads report data with the analytics.readonly scope.
Instructions alone do not enforce a sandbox. The agent host, connected tools and approvals determine what the skill can actually read, change or send.
03 / Things to check
Security concerns & practical limits.
These concerns follow from the reviewed sources. They describe possible exposure or required review; they are not confirmed vulnerabilities.
Review before use
Local credentials are broader than Analytics
The login command also requests the cloud-platform scope. Use a dedicated project and account where possible, and revoke the credentials when finished.
Limits and nuances
- Source review of SKILL.md and the repository license only. The per-language reference files were not reviewed.
- No API was enabled and no report was run. No result accuracy is claimed.
04 / Review record
What we checked. What’s still open.
Recorded review scope
- skills/analytics/google-analytics-data-api-basics/SKILL.md
- LICENSE
Not tested or established
- Source review of SKILL.md and the repository license only. The per-language reference files were not reviewed.
- No API was enabled and no report was run. No result accuracy is claimed.
- Review date
- Source revision
e86adb9e2b80220a593c2be9a68627171fd17afb- Our relationship
- Explored. Investigated through the recorded review. No use or replication is claimed.
Upstream content can change after review. A repository revision identifies source scope; it does not prove that every script, dependency or runtime behavior was tested. How freshness is handled.
Recorded evaluation / Source review
Results with their limits attached.
Completed 5 bounded source checks on the pinned entrypoint and license. No skill workflow was executed.
- Passed
- 5
- Failed
- 0
- Total recorded
- 5
These counts refer to the cases in this report. They are not a benchmark against other skills. A source review does not establish runtime behavior.
Read the evidence reportThe report provides the case definitions, observations and baseline scope. Missing baselines or untested behaviors remain limitations.
Recorded environment
- Pinned public UTF-8 sources fetched from raw.githubusercontent.com at the recorded commit and hashed with SHA-256.
- Linux; Python 3.13.5 source-condition check. No account, credentials, private documents or live business data.
Recorded commands (2)
Commands document this evaluation. They are not setup instructions for your environment.
Read each pinned file listed in sourceManifest.python3 r6_skills.py: check each recorded source condition and reconcile report counts.Findings from this evaluation
Needs attention
Local credentials are broader than Analytics
The login command also requests the cloud-platform scope. Use a dedicated project and account where possible, and revoke the credentials when finished.
Observation
Read-only Analytics scope
The documented login requests the analytics.readonly scope.
Evaluation limitations
- Source review of SKILL.md and the repository license only. The per-language reference files were not reviewed.
- No API was enabled and no report was run. No result accuracy is claimed.
05 / Reuse & discovery
License, attribution & popularity.
Apache-2.0
Apache-2.0 license text inspected at this revision. Keep the license and any NOTICE when redistributing covered files. The services and accounts the skill uses have their own terms.
Why it is in this collection
GitHub displayed 21,407 stars for the google/skills repository on the observation date. Repository-wide; not individual skill usage, quality or safety.
21,407 repository stars
- Scope
- Entire google/skills repository, not this individual skill
- Observed
- Time window
- Snapshot observed 2026-10-19
Popularity and inclusion do not establish quality, compatibility or security. Counts belong to their named metric and date; they are not a current ranking.
06 / Follow the evidence
Go to the original.
- Pinned skill instructions github.com
- Pinned license github.com
- Repository (dated star count) github.com
IonBin’s source notes are independent assessments. Upstream authors retain their work and attribution. This page does not install or execute the skill.