---
name: gog-analytics
description: "Google Analytics (GA4) via the gog CLI (read-only): list account summaries and run GA4 reports via the Analytics Data API. Use for pulling analytics metrics/dimensions into JSON."
---

# gog analytics

Read-only GA4 reporting with parseable output. Pick the account on every call
with `--account <email>` (or set `GOG_ACCOUNT`). Requires the Analytics Admin
and Analytics Data APIs enabled for the account's Cloud project.

## Reads

```bash
gog --account you@example.com analytics accounts --json
gog --account you@example.com analytics report --property <propertyId> \
  --metrics activeUsers,sessions --dimensions date \
  --start-date 2026-05-01 --end-date 2026-05-31 --json
```

## Safety

- Read-only surface — no mutations. Pass `--no-input` in automation.
- stdout is data (`--json`/`--plain`); hints go to stderr.

## Discovery

`gog analytics --help` · `gog analytics <cmd> --help` · `gog schema analytics <cmd> --json`
Reference: <https://gogcli.sh/>
