google-analytics-admin-api-basics
适合需要批量配置或自动化管理 GA4 配置的运维/工程团队。
需要启用 API 和 Cloud IAM 权限,可能涉及高权限操作与敏感配置。
通过 Analytics Admin API 编程化管理 Google Analytics 账户、属性与数据流等设置。
用程序化方式管理 Google Analytics 的账户、property 和数据流,不用手工在界面里一项项点。常在要批量开通属性、配置数据保留、设置 Measurement Protocol secrets 或联通 Firebase/Google Ads 时用到。特别之处是通过 Analytics Admin API(可用 Cloud CLI 启用)把这些操作写成脚本,便于自动化与可重复的配置管理。
▸ 展开 SKILL.md 英文原文
Manages Google Analytics account and property settings, enables the Analytics Admin API via the Cloud CLI, lists accounts and properties, and manages data streams, custom dimensions, conversion events, and integrations. Use when you need to programmatically configure Google Analytics accounts, provision properties, manage data retention, configure Measurement Protocol secrets, or manage Firebase and Google Ads links.
帮我安装这个 skill:https://raw.githubusercontent.com/google/skills/main/skills/analytics/google-analytics-admin-api-basics/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/google/skills/main/skills/analytics/google-analytics-admin-api-basics/SKILL.md"# Getting Started with Google Analytics Admin API
The Google Analytics Admin API provides programmatic access to Google Analytics
account and property configuration. It lets you automate account management,
manage data streams, configure custom dimensions, and handle product
integrations.
## Enabling the API via Cloud CLI
Before making API calls, ensure the Google Analytics Admin API is enabled in
your Google Cloud project.
If `gcloud` is not found, prompt the user to install the Google Cloud CLI before
running these commands.
1. **Enable the API:** Use the Cloud CLI (`gcloud`) to enable
`analyticsadmin.googleapis.com`.
```bash
gcloud services enable analyticsadmin.googlea