HubPublic
Package control recordPublished package

@pasar6987/ga4-data-api

Google Analytics 4 Data API schema — 230+ dimensions across 13 categories and 65+ metrics covering users, sessions, events, revenue, ecommerce, and advertising.

Published package · Latest published 1.0.1 Mar 4, 2026 · 13 datasets / 64 measures in the latest review · Updated Apr 28, 2026

Release path

1.0.1Published Mar 4, 2026

Publisher

@pasar6987Published Mar 4, 2026

Structure snapshot

13 datasets64 measures · 241 dimensions

Reference context

Secondary package facts stay compact

Updated
Apr 28, 2026
Visibility
Public hub listing
License
Apache-2.0
Created
Mar 4, 2026

Reference facts

Secondary package facts after the usage path is clear

Licensing, categorization, ownership, and linked metadata stay below the runnable path so the page reads in the right order.

Format

OSI

Upstream

developers.google.com/analytics/devguides/reporting/data/v1/api-schema

Repository

Not linked

Owner

@pasar6987

Organization

Independent

License

Apache-2.0

Visibility

Public hub listing

Publisher

@pasar6987Published Mar 4, 2026

Latest published version

1.0.1Published Mar 4, 2026

Tags

google-analyticsga4web-analyticsdimensionsmetrics

Schema preview

Schema 0.1.1

SDK handoff

Use this package in code and AI

After structure review, move straight into typed reads with load() or compact LLM context with to_prompt().

Python SDK

Python example for @pasar6987/ga4-data-api

This example uses the current package ref and, when preview data is available, fills in real dataset names from the published summary.

import rawctx

model = rawctx.load("@pasar6987/ga4-data-api")
prompt = rawctx.to_prompt(
    "@pasar6987/ga4-data-api",
    datasets=["User", "Session"],
    max_tokens=2000,
)

print(model.datasets)        # ["User", "Session", "Event"]
print(model.measures)        # [Measure(name="activeUsers", ...), Measure(name="newUsers", ...), Measure(name="totalUsers", ...)]
print(model.dimensions)      # [Dimension(name="userId", ...), Dimension(name="newVsReturning", ...), Dimension(name="firstSessionDate", ...)]
print(model.relationships)   # [Relationship(name='...', ...)]
print(prompt)

README

Package narrative and examples

Use documentation after the package clears provenance, ownership, and runnable-path checks.

Google Analytics 4 Data API Schema

The complete GA4 Data API dimensions and metrics converted to OSI format.

  • API Version: v1beta
  • Dimensions: 241 across 13 categories
  • Metrics: 64
  • Relationships: 11

Datasets (Dimension Categories)

  • User: 10 dimensions
  • Session: 19 dimensions
  • Event: 21 dimensions
  • Ecommerce: 22 dimensions
  • Attribution: 36 dimensions
  • Geographic: 10 dimensions
  • DevicePlatform: 13 dimensions
  • Temporal: 23 dimensions
  • PageContent: 11 dimensions
  • GoogleAds: 22 dimensions
  • DV360: 18 dimensions
  • CM360: 21 dimensions
  • SA360: 15 dimensions

Metric Categories

  • User: 10 metrics
  • Session: 8 metrics
  • Event: 7 metrics
  • PageContent: 5 metrics
  • Revenue: 7 metrics
  • Ecommerce: 17 metrics
  • Advertising: 6 metrics
  • Publisher: 2 metrics
  • Cohort: 2 metrics

Relationships

User → Session → Event → Ecommerce (item scope), with parallel links to Geographic, DevicePlatform, PageContent, Attribution, and ad platform datasets.

Install

rawctx snapshot-download @pasar6987/ga4-data-api

Source

GA4 Data API Schema

Structure review

Inspect package structure after the usage path is clear

Use the structural review when you need the package footprint, field counts, and model paths before a deeper explorer pass.

Models1
Datasets13
Measures64
Dimensions241
Relationships11
AI context1
models/ga4.osi.yamlAI context included
13 datasets64 measures241 dimensions11 relationships

Topology

Semantic graph

Use the graph last, once provenance, documentation, and the runnable path are already clear.

Semantic Graph

Topology counts appear after the graph loads.

Loading graph

Semantic topology is still loading

Counts and graph nodes appear after the latest published summary has been fetched.