Skip to main content
Google Analytics logo

Overview

Add Google Analytics to any ModuleX agent or workflow. Manage Google Analytics 4 properties, list accounts, configure key events, and run analytics reports against the Google Analytics Admin (analyticsadmin.googleapis.com) and Data (analyticsdata.googleapis.com) APIs.
Categories: Analytics & Data · Analytics & Reporting · Marketing · Productivity & Collaboration · Auth: OAuth2 · Actions: 6

Authentication

OAuth2 Authentication

Connect using Google OAuth (recommended)

Required Credentials

OAuth Configuration

  • Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
  • Token URL: https://oauth2.googleapis.com/token
  • Scopes: https://www.googleapis.com/auth/analytics.edit, https://www.googleapis.com/auth/analytics.readonly

Available Actions

Parameters

integer
Maximum number of accounts to return per page. The service may return fewer than this value. If unspecified, at most 50 accounts are returned (max 200). (Default: 50)
string
Optional page token from a previous response, used to retrieve the next page of accounts.

Response

Response

Parameters

string
required
The parent account resource name, e.g. ‘accounts/123456789’. Use list_account_options to discover available accounts.
string
required
Human-readable display name for the new property. Max 100 UTF-16 code units.
string
required
Reporting time zone for the property. Must be a valid IANA timezone identifier, e.g. ‘America/Los_Angeles’, ‘Europe/London’, ‘Asia/Tokyo’.
string
Industry category associated with the property. Valid values include AUTOMOTIVE, FINANCE, HEALTHCARE, TECHNOLOGY, TRAVEL, ARTS_AND_ENTERTAINMENT, GAMES, SHOPPING, JOBS_AND_EDUCATION, and others; pass INDUSTRY_CATEGORY_UNSPECIFIED if unsure.
string
ISO 4217 currency code used in reports involving monetary values, e.g. ‘USD’, ‘EUR’, ‘JPY’.

Response

Parameters

string
required
Parent property resource name where the key event will be created. Format: ‘properties/123’.
string
required
Immutable event name for this key event. Examples: ‘click’, ‘purchase’, ‘sign_up’.
string
required
Method by which the key event is counted across multiple events within a session. Valid values: ONCE_PER_EVENT, ONCE_PER_SESSION, or COUNTING_METHOD_UNSPECIFIED.

Response

Parameters

string
required
ID of the Universal Analytics view to query. Found in the legacy Google Analytics Admin UI under View Settings.
string
required
Start date in YYYY-MM-DD format.
string
required
End date in YYYY-MM-DD format.
array
required
List of metric expression strings (each becomes a {expression: <metric>} entry), e.g. [‘ga:sessions’, ‘ga:pageviews’].
array
Optional list of dimension name strings (each becomes a {name: <dimension>} entry), e.g. [‘ga:country’, ‘ga:browser’].

Response

Parameters

string
required
GA4 property identifier. Accepts either the bare numeric ID (‘123456789’) or the full resource path (‘properties/123456789’); only the numeric ID is sent in the URL.
string
required
Start date in YYYY-MM-DD format.
string
required
End date in YYYY-MM-DD format.
array
required
List of metric name strings (each becomes a {name: <metric>} entry), e.g. [‘activeUsers’, ‘screenPageViews’].
array
Optional list of dimension name strings (each becomes a {name: <dimension>} entry), e.g. [‘country’, ‘deviceCategory’].
object
Optional GA4 FilterExpression object restricting which dimension values appear in the report. See the Google Analytics Data API v1 docs for the schema.

Response

Limits & Quotas

  • Admin API — default quota is 1,200 requests per minute per project, with a daily ceiling of 600,000 requests per project. See the Admin API quotas docs for the per-method breakdown.
  • Data API — quotas are tracked separately per property (core tokens, realtime tokens, server errors). See the Data API quotas docs for the multi-token model and per-tier limits (Standard vs. Analytics 360).
  • Universal Analytics Reporting API v4 is included for backward compatibility only; Universal Analytics properties stopped processing data on July 1, 2024. run_report will return success=False with an API error for any non-GA4 view.
  • Error model — non-2xx HTTP responses and timeouts are caught and returned as success=False plus a populated error string rather than raised. Plan for agent-side retries based on the error string.

Amplitude

Google Tag Manager

Luma