Skip to content
OpenSmartRoute
Skillv1.0.0

pp-google-analytics

Google Analytics 4 Printing Press CLI for GA4 raw reports, funnels, acquisition/revenue insights, period comparisons, anomaly scans, and property-access health checks.

by mvanhorn(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from mvanhorn/printing-press-library (library/marketing/google-analytics/SKILL.md). Install upstream with npx skills add mvanhorn/printing-press-library --skill google-analytics. Copyright stays with the author.

pp-google-analytics

Prerequisites: Install the CLI

This skill drives the google-analytics-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer into a user bin directory:
    npx -y @mvanhorn/printing-press-library install google-analytics --cli-only --bin-dir ~/.local/bin
  2. Verify: google-analytics-pp-cli --version
  3. Ensure ~/.local/bin is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer). This installs into $GOPATH/bin (default $HOME/go/bin), so add that directory to $PATH instead:

go install github.com/mvanhorn/printing-press-library/library/marketing/google-analytics/cmd/google-analytics-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Use this CLI when an agent needs live GA4 property data, acquisition/revenue summaries, ecommerce diagnostics, funnels, period comparisons, anomaly scans, or property-access diagnostics. Use google-search-console-pp-cli for Search Console.

Use google-analytics-pp-cli for GA4-only analytics work. Search Console is covered by google-search-console-pp-cli; do not use the legacy combined GSC/GA4 CLI for new work.

Auth and property selection

  • Service account key: --credentials, else GOOGLE_APPLICATION_CREDENTIALS.
  • Scope: https://www.googleapis.com/auth/analytics.readonly.
  • Property: pass --property, or set GA4_PROPERTY_ID.
  • Fleet health checks: health --properties $GA4_PROPERTY_IDS --agent or set GA4_PROPERTY_IDS.

Durable gotcha: Google Cloud API access is not GA4 property access. The service account must be granted Viewer access inside the GA4 property. If health shows token/admin OK but a property check is 403/404, fix the GA4 property grant rather than rotating credentials.

Best commands for agents

google-analytics-pp-cli agent-context --agent
google-analytics-pp-cli health --properties $GA4_PROPERTY_IDS --agent
google-analytics-pp-cli channels --property "$GA4_PROPERTY_ID" --start 28daysAgo --end yesterday --agent
google-analytics-pp-cli sources --property "$GA4_PROPERTY_ID" --agent
google-analytics-pp-cli top-pages --property "$GA4_PROPERTY_ID" --agent
google-analytics-pp-cli compare --property "$GA4_PROPERTY_ID" --metric sessions,totalRevenue --period wow --agent
google-analytics-pp-cli whats-changed --property "$GA4_PROPERTY_ID" --agent
google-analytics-pp-cli revenue --property "$GA4_PROPERTY_ID" --by channel --agent
google-analytics-pp-cli funnel --property "$GA4_PROPERTY_ID" --steps view_item,add_to_cart,begin_checkout,purchase --agent

Raw wrappers

report, pivot, batch, realtime, metadata, compatibility, properties, property, and streams are available for low-level escape hatches. Prefer novel commands when answering business questions.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/mvanhorn-printing-press-library-google-analytics/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

mvanhorn-printing-press-library-google-analytics.ocm.jsonjson
{
  "ocm": "1",
  "id": "mvanhorn-printing-press-library-google-analytics",
  "kind": "skill",
  "name": "pp-google-analytics",
  "description": "Google Analytics 4 Printing Press CLI for GA4 raw reports, funnels, acquisition/revenue insights, period comparisons, anomaly scans, and property-access health checks.",
  "publisher": "mvanhorn",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "finance"
    ],
    "tags": [
      "skill-md",
      "printing-press",
      "ga4",
      "google-analytics",
      "analytics",
      "marketing",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Google Analytics 4 Printing Press CLI for GA4 raw reports, funnels, acquisition/revenue insights, period comparisons, anomaly scans, and property-access health checks."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/mvanhorn/printing-press-library",
      "path": "library/marketing/google-analytics/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/mvanhorn/printing-press-library/blob/HEAD/library/marketing/google-analytics/SKILL.md",
      "key": "mvanhorn/printing-press-library/library/marketing/google-analytics/SKILL.md"
    }
  },
  "instructions": "# pp-google-analytics\n\n## Prerequisites: Install the CLI\n\nThis skill drives the `google-analytics-pp-cli` binary. **You must verify the CLI is installed before invoking any command from this skill.** If it is missing, install it first:\n\n1. Install via the Printing Press installer into a user bin directory:\n   ```bash\n   npx -y @mvanhorn/printing-press-library install google-analytics --cli-only --bin-dir ~/.local/bin\n   ```\n2. Verify: `google-analytics-pp-cli --version`\n3. Ensure `~/.local/bin` is on `$PATH` for the agent/runtime that will invoke this skill.\n\nIf the `npx` install fails (no Nod",
  "cost": {
    "context_tokens": 794
  }
}

Fetch it by URL: GET /api/v1/registry/mvanhorn-printing-press-library-google-analytics/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.

pp-google-analytics - Skill - OpenSmartRoute