# pp-google-analytics

pp-google-analytics is a Claude Code skill that connects agents to GA4 through google-analytics-pp-cli. It runs channel, funnel, revenue, period-comparison, and anomaly reports.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 152 installs · ★ 2142 repo stars
- Author: mvanhorn
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mvanhorn/printing-press-library/tree/HEAD/cli-skills/pp-google-analytics/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/pp-google-analytics

## What it does

All of them go through the same binary — `google-analytics-pp-cli` — which must be present before any command runs. Install it with `npx -y @mvanhorn/printing-press-library install google-analytics --cli-only --bin-dir ~/.local/bin`, or via Go 1.26.6 or later if Node is unavailable. If `google-analytics-pp-cli --version` says “command not found”, the binary directory is not on `$PATH` and the skill will not proceed.

Authentication uses a Google service account key, passed via `--credentials` or `GOOGLE_APPLICATION_CREDENTIALS`. The GA4 property comes from `--property` or `GA4_PROPERTY_ID`. Named accounts can be stored and switched with `auth add`, `auth set-default`, and `auth remove`. One thing to be aware of: Google Cloud API access and GA4 property access are separate permission layers. When `health` reports the token and admin as OK but a property comes back 403, the service account is missing Viewer access inside that GA4 property — not a credential problem.

Agent-facing commands cover traffic channels (`channels`), source breakdown (`sources`), top pages (`top-pages`), week-over-week comparisons (`compare --period wow`), change detection (`whats-changed`), revenue by channel (`revenue --by channel`), and event funnels (`funnel --steps ...`).

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-google-analytics -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/pp-google-analytics/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/pp-google-analytics/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-google-analytics -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/pp-google-analytics/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-google-analytics -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/pp-google-analytics/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mvanhorn/printing-press-library cli-skills/pp-google-analytics/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/pp-google-analytics/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-google-analytics -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mvanhorn/printing-press-library --path cli-skills/pp-google-analytics
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/pp-google-analytics/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-google-analytics -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/mvanhorn/printing-press-library/tree/HEAD/cli-skills/pp-google-analytics/SKILL.md

## When to use it
- pull a GA4 acquisition-channel summary for any date range
- build a purchase funnel from view_item through to purchase using GA4 events
- compare sessions and revenue week over week and surface the deltas
- scan for traffic anomalies without opening the GA4 dashboard
- check agent access to every property in a fleet with a single health command

## Example prompts
- Show me a channel breakdown for the last 28 days on property `$GA4_PROPERTY_ID`
- Build a funnel with steps `view_item`, `add_to_cart`, `begin_checkout`, `purchase`
- Compare sessions and total revenue for this week versus last week and flag what changed

## Similar
- [google-analytics](https://affpapa.org/en/nevibecode/skills/google-analytics.md) — skill · 539 installs
- [google-analytics-automation](https://affpapa.org/en/nevibecode/skills/google-analytics-automation.md) — skill · 130 installs
- [anacraft — Google Analytics 4](https://affpapa.org/en/nevibecode/mcp/anacraft-google-analytics-4.md) — MCP server · ★ 1 repo stars
- [QuerySail: Google Analytics](https://affpapa.org/en/nevibecode/mcp/querysail-google-analytics.md) — MCP server
- [Google Analytics 4](https://affpapa.org/en/nevibecode/mcp/get-mcp-ads-google-analytics-4.md) — MCP server
- [google-analytics-mcp](https://affpapa.org/en/nevibecode/mcp/google-analytics-mcp.md) — MCP server · ★ 243 repo stars

From the same set: [mvanhorn/printing-press-library](https://affpapa.org/en/nevibecode/by/mvanhorn/printing-press-library.md) — 87 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
