Google Analytics Data Reporting Assistant
Enable the Analytics Data API and build customized Google Analytics reports.
The skill states that Google Analytics read-only access is used and exposes the API-enablement, credential, and data-access flow; the supplied Google provenance and Apache-2.0 license improve traceability. However, `gcloud services enable --quiet` causes an external configuration change without per-action confirmation or rollback guidance, `cloud-platform` is relatively broad, and sensitive-data handling, credential isolation, transfer boundaries, and recovery are underdocumented, so points are deducted.
The main path covers API enablement, ADC setup, library installation, report execution, and compatibility checks, and the examples are broadly consistent. The supplied material contains no tests, CI coverage, or reproducible execution evidence; most languages lack timeout, retry, pagination, empty-result, and structured error handling, leaving abnormal-case diagnosis largely to native errors. The score is therefore capped and reduced under static calibration.
Audience scenarios, supported languages, common fields, and compatibility-check use cases are reasonably clear. Non-fit cases, exclusion triggers, permission prerequisites, property-type constraints, and Chinese-language usage are not specified; the core function depends on Google Cloud, ADC, and network reachability, with no mainland-China fallback described, so points are deducted.
The structure is readable, and language-specific references provide basic progressive disclosure with prerequisites, examples, official-resource links, license context, and repository maintenance signals. Explicit version pinning, changelog, compatibility matrix, named maintenance responsibility, update policy, FAQs, and systematic troubleshooting are missing; `LATEST_LIBRARY_VERSION` is also an unresolved installation placeholder, so points are deducted.
The skill can directly guide API enablement, client installation, basic report execution, and dimension-metric compatibility checks, giving it clear core utility. Outputs are limited to simple console printing and do not cover filtering, pagination, quotas, sampling, empty results, authorization failures, or production report formats. The examples were not externally verified in this review, so additional engineering work remains.
The files provide auditable commands, code, package names, API methods, and official reference pointers, supporting limited primary-material verification. They contain no committed tests, CI results, revision-specific validation records, or third-party execution evidence, and no code was executed during this review, so a higher score is not justified.
- Before enabling the API or logging in with ADC, confirm the target Cloud project, account, authorization scopes, and organizational policies; `--quiet` is not a confirmation control.
- Do not use the sample dates, property ID, or field combinations directly in production; validate property access, field compatibility, quotas, privacy requirements, and the applicable API version first.
- In mainland-China networks or environments with unreliable Google-service access, the core workflow may be unavailable; no network or fallback procedure is documented.
- Dependencies are not pinned; production use should adopt reviewed versions and a dependency lock file.
What does this skill do, and when should you use it?
This skill helps users access Google Analytics reporting data through the Google Analytics Data API v1beta. It covers enabling the API with gcloud, configuring Application Default Credentials, and creating reports with official client libraries. It also addresses common metrics and dimensions and provides compatibility checks before report execution. It is suited to developers and analysts who need programmatic access to Google Analytics properties.
Checks for the Google Cloud CLI, guides API enablement for analyticsdata.googleapis.com, and verifies that the service is enabled; configures Application Default Credentials with cloud-platform and analytics.readonly scopes; builds and runs report requests with official client libraries; queries metrics such as activeUsers, sessions, and screenPageViews and dimensions such as city and date; and uses getMetadata() and checkCompatibility() to validate fields and metric-dimension combinations.
- A developer needs active users and sessions grouped by city and date from a Google Analytics property.
- A user is enabling the Analytics Data API for the first time in a Google Cloud project.
- An engineer is integrating reporting through the Python, Java, PHP, Node.js, Go, .NET, or Ruby client library.
- An analyst receives an INVALID_ARGUMENT error and needs to check whether selected metrics and dimensions are compatible.
- A team is building a customized dashboard or automating a reporting workflow.
What are this skill's strengths and limitations?
- Covers the main onboarding flow from API enablement and authentication to reporting and compatibility checks.
- Supports client libraries for Python, Java, PHP, Node.js, Go, .NET, and Ruby.
- Includes runnable Python examples for report execution and compatibility checks.
- Specifies the v1beta API and documents commonly used metrics and dimensions.
- Requires a Google Cloud project, a Google Analytics property ID, appropriate permissions, and available quota.
- Depends on the Google Cloud CLI, Application Default Credentials, and a language-specific client library.
- The supplied source does not include the detailed contents of the language-specific setup references.
- The source provides no test suite or verified platform matrix.
- Examples use v1beta, and migration instructions for other API versions are not provided.
How do you install this skill?
In an Agent Skills-compatible client, run npx skills add google/skills and select skills/analytics/google-analytics-data-api-basics from the repository. The README does not specify an additional client-specific directory or copy procedure. When a programming language is selected, read its corresponding setup guide under references/; the contents of those guides are not included in the supplied source material.
How do you use this skill?
Example trigger: “Help me enable the Google Analytics Data API and use Python to query activeUsers and sessions grouped by city and date for a property.” Ensure the Google Cloud CLI is installed, then run gcloud services enable analyticsdata.googleapis.com --quiet, gcloud services list --enabled --filter="analyticsdata.googleapis.com", and gcloud auth application-default login --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/analytics.readonly". The Python example also requires pip install google-analytics-data; replace YOUR-PROPERTY-ID with the actual property ID.