# Check GA4 Report Compatibility

Check dimensions/metrics and filters for core reports. DateRanges, ordering and pagination are intentionally not sent to compatibility. Realtime rules differ; this method does not validate realtime requests. Returned objects are limited to 

Canonical URL: https://opennodeflow.dev/wiki/reference-ga4-compatibility-check/
JSON reference: https://opennodeflow.dev/wiki/reference-ga4-compatibility-check/index.json
Source snapshot: 2026-10-23

# Check GA4 Report Compatibility

Library pack: Google providers, authored 20 October 2026.

Check dimensions/metrics and filters for core reports. DateRanges, ordering and pagination are intentionally not sent to compatibility. Realtime rules differ; this method does not validate realtime requests. Returned objects are limited to 3 MB UTF-8 to leave ONF transport headroom; reduce page/row/page-count bounds or use one-page reads if this limit is reached.

## Wiring
- `request` (@ga4.request): Request (required)

- `compatibility` (@ga4.compatibility): Compatibility

## Configuration and effects
Pure builders/codecs never call a provider. Network nodes read Google data only; POST report/search is read-only. Choose the numeric property/customer explicitly. Configuration contains secret **names**, never token values. Default access-token mode requires a short-lived OAuth token in ONF Settings. Refresh-token mode reads client-ID, client-secret and refresh-token secrets and refreshes internally; no token is returned, logged or checkpointed. GA4 scope: `https://www.googleapis.com/auth/analytics.readonly`. Ads scope: `https://www.googleapis.com/auth/adwords`, an authorized developer token and account access; manager login-customer-id is separate. ONF LAN access does not grant Google access.

Network origin is fixed to the official HTTPS service; only an explicit HTTP loopback mock override is accepted. Redirects are rejected. Request timeout defaults to 15 s. Response bytes are bounded (8 MB default), reads retry 429/500/502/503/504 up to twice, honor Retry-After up to 30 s, and fail for longer waits so a schedule/durable timer can retry later. Authentication/permission/invalid requests are not retried. ONF worker cancellation kills the attempt; accepted remote reads consume provider quota and cannot be undone. Bound paging to the configured pages/rows; inspect complete and continuation before treating results as the whole dataset. OAuth refresh is attempted once per node attempt, not blindly retried. Sanitized failures omit provider bodies and credential values.

GA4 pagination is offset/limit; Ads Search has provider-fixed 10,000-row pages and nextPageToken, no pageSize. Integer metrics, Ads IDs and micros remain strings to prevent JavaScript precision loss. Reporting reads are safe to repeat but are not snapshot isolation and cost provider quota; no exactly-once promise.

## Setup and verification
Enable the provider API in a chosen Google Cloud project, grant the principal property/account access, complete OAuth consent or configure a separately managed service-account token, then enter secrets in ONF Settings. This pack does not run an OAuth consent server, create accounts or send Measurement Protocol events, change Ads budgets/campaigns, import conversions, or perform business writes. Tests use isolated synthetic localhost providers; they do not prove live account access. Full setup, examples, bounds and evidence: `GOOGLE-INTEGRATIONS.md` in the delivered pack.

Official reference: [Google Analytics Data API](https://developers.google.com/analytics/devguides/reporting/data/v1).

## Audited socket contract (21 October 2026)

Inputs:
- `request`: `@ga4.request`; required.

Outputs:
- `compatibility`: `@ga4.compatibility`; required.

Configuration:
- `authMode`: string; default "accessToken". Use a pre-acquired short-lived token, or refresh internally without emitting tokens.
- `accessTokenSecret`: string; default "GOOGLE_ACCESS_TOKEN"
- `clientIdSecret`: string; default "GOOGLE_OAUTH_CLIENT_ID"
- `clientSecretSecret`: string; default "GOOGLE_OAUTH_CLIENT_SECRET"
- `refreshTokenSecret`: string; default "GOOGLE_REFRESH_TOKEN"
- `requestTimeoutMs`: integer; default 15000
- `readRetries`: integer; default 2
- `maxResponseBytes`: integer; default 8000000
- `mockOrigin`: string; default "". Tests only: explicit http://127.0.0.1:PORT loopback origin; no redirects.
- `oauthMockOrigin`: string; default "". Tests only: explicit loopback origin for token refresh.
- `propertyId`: string; no automatic default. Numeric GA4 property ID; not a G- measurement ID.
- `compatibleOnly`: boolean; default false

Known provider records and list elements have structural schemas. Explicit dynamic payloads, selected query results and provider extensions retain the recursive JSON Value vocabulary; they do not imply a known provider entity. Null is distinct from omission. Runtime validates the exact selected immutable type version; reading newer documentation never repins existing graphs. This audit used synthetic fixtures/local mocks and does not establish live provider authorization or delivery.

## Catalog identity

| Field | Value |
| --- | --- |
| Source key | `ga4.compatibility.check` |
| Kind | node |
| Family | google-analytics |
| Pack | See library discovery |

[Integration guide](/wiki/integration-google-analytics/) · [Browse the catalog](/wiki/integration-catalog/)

## Inputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `exec` | Execute | control | No |  |
| `request` | Request | @ga4.request v1 | Yes |  |

## Outputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `next` | Next | control | No |  |
| `compatibility` | Compatibility | @ga4.compatibility v1 | Yes |  |
| `error` | On error | control | No |  |

## Configuration schema


```json
{
  "type": "object",
  "properties": {
    "authMode": {
      "type": "string",
      "enum": [
        "accessToken",
        "refreshToken"
      ],
      "default": "accessToken",
      "description": "Use a pre-acquired short-lived token, or refresh internally without emitting tokens."
    },
    "accessTokenSecret": {
      "type": "string",
      "default": "GOOGLE_ACCESS_TOKEN"
    },
    "clientIdSecret": {
      "type": "string",
      "default": "GOOGLE_OAUTH_CLIENT_ID"
    },
    "clientSecretSecret": {
      "type": "string",
      "default": "GOOGLE_OAUTH_CLIENT_SECRET"
    },
    "refreshTokenSecret": {
      "type": "string",
      "default": "GOOGLE_REFRESH_TOKEN"
    },
    "requestTimeoutMs": {
      "type": "integer",
      "minimum": 100,
      "maximum": 120000,
      "default": 15000
    },
    "readRetries": {
      "type": "integer",
      "minimum": 0,
      "maximum": 3,
      "default": 2
    },
    "maxResponseBytes": {
      "type": "integer",
      "minimum": 1024,
      "maximum": 16000000,
      "default": 8000000
    },
    "mockOrigin": {
      "type": "string",
      "default": "",
      "description": "Tests only: explicit http://127.0.0.1:PORT loopback origin; no redirects."
    },
    "oauthMockOrigin": {
      "type": "string",
      "default": "",
      "description": "Tests only: explicit loopback origin for token refresh."
    },
    "propertyId": {
      "type": "string",
      "description": "Numeric GA4 property ID; not a G- measurement ID."
    },
    "compatibleOnly": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "propertyId"
  ],
  "additionalProperties": false
}
```





## Source and installed versions

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See [versioning](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
