Google Analytics
Google Analytics is a web analytics platform that tracks and reports website and app traffic, user behavior, and conversion metrics.
Connectors
Choose the connector that matches your authentication method. The options below use the names shown in StackAI.
Google Analytics
OAuth sign-in
Google Analytics
Connect to Google Analytics to access your website and app analytics data, including traffic metrics, user behavior, and custom reports.
Set up in Google Analytics
Sign in to the Google account that has access to your Google Analytics (GA4) properties.
Set up in StackAI
Open Settings → Connections, add a connection, and select Google Analytics.
Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.
Provider documentation: Setup reference.
Verify the connection
Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.
If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.
Use an action
Add the required Google Analytics action to the workflow.
Select a connection when the action requests one.
Complete the required fields. Use the reference picker when a value comes from another workflow step.
Run the workflow and inspect the action’s output. Check the result before using it in a later step.
Actions
Run Report
Run a report to get analytics data from a GA4 property
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Metrics
string
Yes
Comma-separated metric names (e.g. activeUsers, sessions, screenPageViews).
Dimensions
string
No
Comma-separated dimension names (e.g. date, country, pagePath). Default: .
Start Date
string
Yes
Start date in YYYY-MM-DD format, or relative like '7daysAgo', '30daysAgo'.
End Date
string
Yes
End date in YYYY-MM-DD format, or relative like 'today', 'yesterday'.
Row Limit
integer
No
Maximum number of rows to return (default 500, max 250000). Default: 500.
Outputs
Result Message
string
A message indicating the result of the operation.
Report Rows
array
The report data rows with dimension and metric values.
Row Count
number
Total number of rows returned.
Metric Headers
array
The metric column names in the report.
Dimension Headers
array
The dimension column names in the report.
Run Realtime Report
Get realtime analytics data showing current active users and activity
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Metrics
string
Yes
Comma-separated realtime metric names (e.g. activeUsers, screenPageViews).
Dimensions
string
No
Comma-separated realtime dimension names (e.g. country, unifiedScreenName). Default: .
Row Limit
integer
No
Maximum number of rows to return (default 500, max 250000). Default: 500.
Outputs
Result Message
string
A message indicating the result of the operation.
Report Rows
array
The realtime report data rows with dimension and metric values.
Row Count
number
Total number of rows returned.
Metric Headers
array
The metric column names in the report.
Dimension Headers
array
The dimension column names in the report.
Get Metadata
List all available metrics and dimensions for a GA4 property
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Outputs
Result Message
string
A message indicating the result of the operation.
Metadata Resource Name
string
The Google Analytics metadata resource name.
Available Metrics
array
List of available metrics with their documented Google Analytics metadata fields.
Available Dimensions
array
List of available dimensions with their documented Google Analytics metadata fields.
Available Comparisons
array
List of available comparisons with their documented Google Analytics metadata fields.
Metric Count
number
Total number of available metrics.
Dimension Count
number
Total number of available dimensions.
Comparison Count
number
Total number of available comparisons.
List Account Summaries
List all Google Analytics accounts and GA4 properties you have access to
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Page Size
integer
No
Maximum number of account summaries to return (default 50, max 200). Default: 50.
Outputs
Result Message
string
A message indicating the result of the operation.
Account Summaries
array
List of accounts with their GA4 properties.
Total Accounts
number
Total number of accounts returned.
Total Properties
number
Total number of properties across all accounts.
List Properties
List Google Analytics properties matching a filter expression
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Filter
string
Yes
Required filter expression for the Admin API. Examples: parent:accounts/123456, parent:properties/123456, ancestor:accounts/123456, firebase_project:project-id.
Page Size
integer
No
Maximum number of properties to fetch per API page (default 50, max 200). Default: 50.
Show Deleted
boolean
No
Whether to include soft-deleted properties in the results. Default: false.
Outputs
Result Message
string
A message indicating the result of the operation.
Properties
dict_array
List of Google Analytics properties that matched the filter.
Total Properties
number
Total number of properties returned.
Get Property
Get a single Google Analytics property by property ID
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Outputs
Result Message
string
A message indicating the result of the operation.
Property
dict
The Google Analytics property details.
Check Compatibility
Check which metrics and dimensions can be used together in a report
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Metrics
string
No
Comma-separated metric names to check compatibility for. Default: .
Dimensions
string
No
Comma-separated dimension names to check compatibility for. Default: .
Outputs
Result Message
string
A message indicating the result of the compatibility check.
Compatible Metrics
array
Metrics that are compatible with the given dimensions.
Compatible Dimensions
array
Dimensions that are compatible with the given metrics.
Incompatible Metrics
array
Metrics that are NOT compatible with the given dimensions.
Incompatible Dimensions
array
Dimensions that are NOT compatible with the given metrics.
List Data Streams
List all data streams (websites and apps) for a GA4 property
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Page Size
integer
No
Maximum number of data streams to return (default 50, max 200). Default: 50.
Outputs
Result Message
string
A message indicating the result of the operation.
Data Streams
array
List of data streams for the property.
Total Streams
number
Total number of data streams returned.
List Audiences
List all configured audience segments for a GA4 property
Required permissions: https://www.googleapis.com/auth/analytics.readonly.
Inputs
Property ID
select (string)
Yes
The GA4 property ID. Select from the dropdown or enter manually. Options load from the selected connection.
Page Size
integer
No
Maximum number of audiences to return (default 50, max 200). Default: 50.
Outputs
Result Message
string
A message indicating the result of the operation.
Audiences
array
List of configured audience segments for the property.
Total Audiences
number
Total number of audiences returned.
Important behavior
If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.
Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.
The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.
Last updated
Was this helpful?

