← ClaudeAtlas

ga-reportlisted

Pull Google Analytics 4 data for a client project and compile a branded benchmark report with action points. Authenticates via service account, fetches sessions/users/channels/pages/devices, writes a markdown report, and outputs a branded PDF via brand-doc.
markbaindesign/bain-studio · ★ 0 · Data & Documents · score 63
Install: claude install-skill markbaindesign/bain-studio
# GA Report Pull GA4 data and compile a client-ready benchmark report. ## Usage ``` /ga-report NORE /ga-report NORE --property 542141660 /ga-report NORE --days 30 /ga-report NORE --property 542141660 --days 90 ``` Arguments: - `PROJECT` — project prefix (required). Used to look up client name and output path. - `--property ID` — GA4 property ID (numeric). If omitted, reads from project CLAUDE.md or prompts. - `--days N` — reporting period in days (default: 90). --- ## Auth setup (one-time per workspace) The fetcher authenticates via a Google service account. **Requirements:** 1. A Google Cloud project with the **Google Analytics Data API** enabled 2. A service account with the JSON key downloaded 3. The service account email added as a **Viewer** on the GA4 property 4. `GOOGLE_SA_JSON=/path/to/sa.json` added to `studio/.env` Recommended key location: `~/.config/bain-studio/google-sa.json` (outside any git repo) If `GOOGLE_SA_JSON` is not set, ask Mark for the path before proceeding. --- ## Steps ### 1. Parse arguments Extract `PROJECT`, `--property`, and `--days` from the invocation. Uppercase the prefix. ### 2. Look up project details Read the project file from `docs/projects/{slug}.md` (match by prefix). Extract: - `name:` — client/project name for the report title - Any GA property ID if noted If `--property` was not supplied and no property ID is found in the project file, ask for it. ### 3. Check credentials ```bash source /media/data/dev/bain-studio/s