google-analytics

google-analytics is a skill for Claude Code from VKirill/claude-lane-stack. It costs 188 tokens per session (5,736 once invoked), scanned A, original, MIT.

A reference guide for the Google Analytics 4 APIs, which let software retrieve website or app usage data such as sessions, users, and conversions. It covers API versions, client libraries, filters, reports, real-time data, and storing summaries in PostgreSQL.

In plain words
What is it for?
Use it to build dashboards, take daily snapshots, monitor recent traffic, compare date ranges, filter reports, and load aggregate GA4 data into PostgreSQL.
Why use it?
It provides instructions for collecting and comparing analytics data programmatically instead of manually exporting reports or guessing the API request format.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Source of truth: [STACK_VERSIONS.md](../../STACK_VERSIONS.md) — verified 2026-08-24.

Part of the lane-stack plugin — 62 skills, 4 commands, 13 agents, 1 MCP server shipped together

Good fit Use it to build dashboards, take daily snapshots, monitor recent traffic, compare date ranges, filter reports, and load aggregate GA4 data into PostgreSQL.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/VKirill/claude-lane-stack
agentmods
npx agentmods add skills/vkirill/claude-lane-stack/google-analytics

Made for: Claude Code.

Or install lane-stack, the plugin that ships this one along with the rest of its 62 skills, 4 commands, 13 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for google-analytics

README.md
[![agentmods](https://agentmods.dev/badge/skills/vkirill/claude-lane-stack/google-analytics/github.svg)](https://agentmods.dev/skills/vkirill/claude-lane-stack/google-analytics)
Your own site
<a href="https://agentmods.dev/skills/vkirill/claude-lane-stack/google-analytics"><img src="https://agentmods.dev/badge/skills/vkirill/claude-lane-stack/google-analytics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for google-analytics

Your own site · 80×15
<a href="https://agentmods.dev/skills/vkirill/claude-lane-stack/google-analytics"><img src="https://agentmods.dev/badge/skills/vkirill/claude-lane-stack/google-analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,736 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00188 $0.05736
Opus 5.5 $0.00075 $0.02294
Sonnet 5.5 $0.00038 $0.01147
Haiku 4.5 $0.00019 $0.00574

Measured 1mo ago against content hash 9e887e1fbdde, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

google-analytics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/lane-stack/skills/google/google-analytics/SKILL.md · 316 lines

How it starts

The opening of the file, as written. The whole thing — 316 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Version Requirements (May 2026)

Primary pins:

  • GA4 Data API: v1beta (stable; base https://analyticsdata.googleapis.com/v1beta/)
  • GA4 Admin API: v1beta (https://analyticsadmin.googleapis.com/v1beta/)
  • Python client: google-analytics-data >= 0.18
  • Node.js client: @google-analytics/data ^4.x
  • Python: 3.14.x
  • Node.js: 24.x (Active LTS)

Source of truth: STACK_VERSIONS.md — verified 2026-08-24

Usage

Loaded automatically when its description matches the active task. Read only the section you need, then follow the link to the relevant reference file for full detail.

Use this skill when

  • Programmatic pulls of GA4 data for dashboards: sessions, active users, conversions by source / channel / device
  • Daily GA4 snapshot to PostgreSQL for SQL analytics and LTV calculations (aggregates, not event-level)
  • Real-time traffic monitoring (last 30 min) for campaign launches, deployment monitoring, alerting
  • Comparative reporting across multiple periods (multiple dateRanges in one request)
  • Complex filtering: building FilterExpression with andGroup / orGroup / notExpression, stringFilter (EXACT, BEGINS_WITH, ENDS_WITH, CONTAINS, FULL_REGEXP, PARTIAL_REGEXP), inListFilter, numericFilter, betweenFilter
  • Pivot reports (2D crosstabs: source x device, country x device)
  • Cohort retention reports (firstSessionDate cohorts, DAILY/WEEKLY/MONTHLY granularity, cohortActiveUsers)
  • Batch efficiency: packing 5 reports into one HTTP call via batchRunReports
  • Configuration: listing properties, custom dimensions, conversion events via Admin API v1beta
  • Token budget monitoring (returnPropertyQuota: true and reading PropertyQuota in the response)
  • Backend authorization: service account granted access via Admin -> Property -> Property Access Management

Do not use this skill when

  • Universal Analytics (UA, UA-XXXXX) — sunset 2024-07-01, API disabled. Migration is not "switch the ID"; semantics differ (sessions vs events, dimensions, attribution). Move the account to GA4 first.
  • Event-level export (millions of raw rows) — Data API returns aggregates; for raw events use BigQuery Export GA4 (cascade -> bigquery)
  • Russian analog of GA4 — yandex-metrica (cascade -> yandex-metrica); a different dimension / metric universe
  • Search Console data (CTR / impressions / positions) — google-search-console (cascade)
  • Managing containers / triggers / tags — Google Tag Manager API, google-tag-manager (cascade)
  • Generic Google Cloud auth setup (service account creation, key issuance, gcloud auth) — google-cloud-auth (cascade)
  • A/B testing inside GA4 — either GTM + Optimize (deprecated) or a dedicated feature flag service
  • Writing data into GA4 — Data API is read-only; for event writes use Measurement Protocol (different API)
  • Parsing the GA4 UI (Explorations, default Acquisition / Engagement reports) — Data API does not mirror UI reports 1:1; build the slice yourself

Read the full file on GitHub · 316 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 316 lines · 188 tokens per session scan A 9e887e1fbdde

Subscribe to this mod's changes

google-analytics is a skill published in the GitHub repository VKirill/claude-lane-stack (124 stars, last pushed 5d ago), licensed MIT. It adds 188 tokens to every session and 5,736 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source…

google/skills · 108 tokens

postgres-database-migration

Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases. Trigger when user asks to: Test a schema migration before applying it to production Add, remove, or rename columns safely on a live table Change a column's data…

timescale/pg-aiguide · 220 tokens

timescaledb-hyperfunctions

Use this skill when writing analytical SQL over time-series data with the TimescaleDB Toolkit (timescaledbtoolkit extension) hyperfunctions: approximate percentiles, statistical summaries, time-weighted averages, counter/gauge rates, uptime/heartbeat tracking, state durations, OHLC candlesticks, approximate distinct…

timescale/pg-aiguide · 298 tokens

design-postgis-tables

Comprehensive PostGIS spatial table design reference covering geometry types, coordinate systems, spatial indexing, and performance patterns for location-based applications.

timescale/pg-aiguide · 31 tokens

migrate-postgres-tables-to-hypertables

Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation. Trigger when user asks to: Migrate or convert PostgreSQL tables to hypertables Execute hypertable migration with minimal downtime Plan blue-green migration for large tables Validate…

timescale/pg-aiguide · 181 tokens