Skip to content
OpenNodeFlow.DocsOpen beta ↗
Agent guide ↗
Docs/Library asset reference

Encode GA4 Date Ranges JSON

Serialize the exact GA4 Date Ranges value to JSON text. Pure, deterministic, preserves optional absence, list order, exact integer strings and provider remainder fields.

23 Oct 2026 · 3 min read
Markdown ↗JSON ↗

Encode GA4 Date Ranges JSON#

Library pack: Google providers, authored 20 October 2026.

Serialize the exact GA4 Date Ranges value to JSON text. Pure, deterministic, preserves optional absence, list order, exact integer strings and provider remainder fields.

Wiring#

  • value (@ga4.dateRanges): Value (required)

  • text (string): Text

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.

Audited socket contract (21 October 2026)#

Inputs:

  • value: @ga4.dateRanges; required.

Outputs:

  • text: string; required.

Configuration: No asset-specific configuration.

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#

FieldValue
Source keyga4.dateRanges.encode.json
Kindnode
Familygoogle-analytics
PackSee library discovery

Integration guide · Browse the catalog

Inputs#

Socket IDLabelTypeRequiredMeaning
execExecutecontrolNo
valueValue@ga4.dateRanges v1Yes

Outputs#

Socket IDLabelTypeRequiredMeaning
nextNextcontrolNo
textTextstringYes
errorOn errorcontrolNo

Configuration schema#

json
{
  "type": "object",
  "properties": {},
  "required": [],
  "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, connections and integration setup.

Source provenance

Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.

  • ../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
Type to search the documentation.
↑ ↓ to navigate · Enter to openAgent map ↗