> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Analytics 4 reports

> Land bounded GA4 historical and realtime Data API reports.

Follow the [REST app guide](https://docs.bijection.com/integrations/native-rest.md#mount-and-bind).
Pass the same protected label to the receiver binder and as the app's `data`. Use a
sealed OAuth bearer access token with property read access and the
`https://www.googleapis.com/auth/analytics.readonly` scope.

For `google-analytics.report`, bind `providerEndpoint` to
`https://analyticsdata.googleapis.com` and
`/v1beta/properties/PROPERTY_ID:runReport`. Declare one to three dimensions
from `date`, `country`, `deviceCategory`, `eventName` and `platform`.
Declare up to six metrics from `activeUsers`, `eventCount`, `keyEvents`,
`screenPageViews`, `sessions`, `newUsers`, `totalUsers` and
`engagedSessions`.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ profile: { mode: "provider", provider: "google-analytics.report", limit: 80,
  start: "2026-10-01", end: "2026-10-07",
  report: { dimensions: ["date", "deviceCategory"], metrics: ["activeUsers", "sessions"] } } }
```

The inclusive window is at most 31 days in the property's reporting
timezone. A complete answer finishes the source.

For `google-analytics.realtime.report`, bind the same origin with
`/v1beta/properties/PROPERTY_ID:runRealtimeReport`. Declare
`report.minutes` from 1 through 30 and omit `start` and `end`. Realtime
offers `minutesAgo`, `country`, `deviceCategory`, `eventName` and `platform`
as dimensions and the first four metrics listed above. Realtime polls
replace observations at the same dimension key. A `minutesAgo` key is a
relative bucket that moves with the rolling window.

Both modes require all rows in one 36 KiB answer, with an installer limit of
up to 100 rows. The connector checks response columns and total row count.
Omitted groups leave existing observations in place.

[GA4 historical schema](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema) · [GA4 realtime schema](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema)

## Conversion writes

Use `google-analytics.events.collect` to submit an event that GA4 can
evaluate as a key event under the property's configuration. Bind
`receivers.writers[mode]` with `providerWriter` on
`https://www.google-analytics.com` or `https://region1.google-analytics.com`.
Seal the `api_secret` and `measurement_id` using `multiSecret` query
bindings. Submit a `create` command with `client_id` and one entry in
`events`. HTTP 204 acknowledges transport receipt only.

Follow the [native write guide](https://docs.bijection.com/integrations/native-connectors.md#provider-writes) with the same protected `data` label on the writer and the app.
Each command takes one JSON object up to 24 KiB. The mount binds its
key to the exact command and dispatches once. An unresolved dispatch
stays unknown. Acknowledgement does not establish attribution.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.