lucianfialho/gmp-cli/gmp-ga-report

Claude Code and agent skill by lucianfialho/gmp-cli

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

GA4: Run analytics reports with dimensions, metrics, filters, and date ranges.

Install

npx vskill@latest install lucianfialho/gmp-cli/gmp-ga-report

SKILL.md

ga report

PREREQUISITE: Read ../gmp-shared/SKILL.md for auth, global flags, and output formats.

Run a GA4 report with dimensions, metrics, filters, and date ranges.

Usage

bash
gmp ga report -p <PROPERTY_ID> -m <METRICS> [flags]

Flags

FlagRequiredDefaultDescription
-p, --property <id>No*--GA4 property ID (numeric)
-m, --metrics <list>Yes--Comma-separated metrics
-d, --dimensions <list>No--Comma-separated dimensions
-r, --date-range <range>No30dDate range: 30d, 7d, yesterday, 2024-01-01..2024-01-31
-l, --limit <n>No10000Row limit
--filter <expr>No--Dimension filter (fieldName==value)
--sort <field>No--Sort by a requested metric or dimension name (server-side, via the API's native orderBys)
--order <dir>NodescSort direction: asc, desc
--compare <mode>No--previous_period (equal-length preceding window) or previous_year (same dates, one year back)
-f, --format <fmt>NojsonOutput format: json, table, csv

\* Falls back to gmp config set property. Errors with a clear message if neither is set. See ../gmp-shared/SKILL.md.

Date Range Formats

FormatExampleDescription
Relative30d, 7d, 90dLast N days
Keywordstoday, yesterdaySingle day
Absolute2024-01-01..2024-01-31Custom range

Examples

bash
# Sessions and bounce rate by page, last 30 days
gmp ga report -p 123456789 -m sessions,bounceRate -d pagePath -r 30d
# With filter
gmp ga report -p 123456789 -m sessions -d pagePath --filter "pagePath==/product"
# Custom date range
gmp ga report -p 123456789 -m sessions -r 2024-01-01..2024-01-31
# Output as table or CSV
gmp ga report -p 123456789 -m sessions -d pagePath -f table
gmp ga report -p 123456789 -m sessions -d pagePath -f csv > report.csv
# Top 10 pages by sessions (server-side sort + limit)
gmp ga report -p 123456789 -m sessions -d pagePath --sort sessions -l 10 -f table
# This week vs the equal-length prior week, in one call
gmp ga report -p 123456789 -m sessions,activeUsers -r 7d --compare previous_period -f table
# This month vs the same month last year
gmp ga report -p 123456789 -m sessions -r 30d --compare previous_year -f table
# Relying on a stored default property (gmp config set property 123456789)
gmp ga report -m sessions -d pagePath -f table

Common Metrics

MetricDescription
sessionsTotal sessions
activeUsersActive users
screenPageViewsPage views
bounceRateBounce rate
averageSessionDurationAvg session duration
conversionsTotal conversions
totalRevenueTotal revenue

Common Dimensions

DimensionDescription
pagePathPage path
sessionDefaultChannelGroupChannel (Organic, Paid, etc.)
countryCountry
cityCity
deviceCategoryDevice (desktop, mobile, tablet)
dateDate (YYYYMMDD)
landingPageLanding page path
sessionSourceTraffic source
sessionMediumTraffic medium

Tips

  • Use gmp ga metadata -p PROPERTY_ID to discover all available metrics/dimensions.
  • Use gmp ga check to validate combinations before running complex reports.
  • --sort must name a metric or dimension already in -m/-d -- it errors clearly otherwise. Because sorting and -l/--limit both happen server-side, --sort sessions -l 10 gives a true top-10, not a truncate-then-reorder of whatever the API returned first.
  • --compare adds an implicit dateRange dimension to the output (values current/previous) -- no need to add it to -d yourself.
  • Pipe JSON output to jq for filtering: gmp ga report ... | jq '.[0:5]'
  • Export to CSV for spreadsheet analysis: gmp ga report ... -f csv > report.csv

See Also

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lucianfialho/gmp-cli/gmp-ga-report/badge)](https://verified-skill.com/skills/lucianfialho/gmp-cli/gmp-ga-report)

Something wrong with this skill or its page? Tell us.