Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Data (V1Beta) - Property → Run Realtime Report

AI-generated

Overview

This node integrates with the Google Analytics API, specifically supporting a wide range of administrative and data reporting operations across different API versions (v1alpha, v1beta) and resource types. For the selected Resource "Data (V1Beta) - Property" and Operation "Run Realtime Report," it allows users to run real-time reports on a specified Google Analytics property.

This is useful for scenarios where immediate insights into user activity are needed, such as monitoring live traffic, tracking events as they happen, or debugging analytics setups in real time.

Example use cases:

  • A marketing team wants to see how many users are currently active on their website.
  • A developer needs to verify that event tracking is firing correctly during a live test.
  • An analyst wants to monitor real-time conversions or user engagement metrics.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property for which the realtime report will be run.
Query Parameters Optional parameters to customize the request, including:
- Calculated Metric ID: ID for a calculated metric to include
- Entity: Level of data access report (property or account level)
- Filter: Expression to filter results
- Names: Names of access bindings to retrieve
- Page Size: Maximum number of report tasks to return
- Page Token: Continuation token for pagination
- Show Deleted: Whether to include soft-deleted properties
- Universal Analytics Property ID: UA property to look up connected GA4 property
- Update Mask: List of fields to update (snake case)
Request Body JSON object containing the body of the request, typically specifying the realtime report query details.

Output

The node outputs an array of JSON objects representing the response from the Google Analytics API's realtime report endpoint. The structure corresponds directly to the API's realtime report response, which includes metrics and dimensions about current user activity on the specified property.

If the API supports binary data output for this operation, it would be summarized here; however, this operation returns JSON data only.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • The node uses the Google Analytics Data API endpoints (https://analyticsdata.googleapis.com/v1beta).
  • Proper permissions on the Google Analytics property are necessary to run realtime reports.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics are properly set up and linked in n8n.
  • Required Parameter Errors: Errors like "Property ID is required" indicate that mandatory input parameters were not provided. Verify that the Property ID field is filled.
  • API Request Failures: Errors returned from the Google Analytics API may include rate limits, permission issues, or invalid query parameters. Check the error message for details and confirm API quotas and access rights.
  • Invalid JSON in Request Body: If the request body JSON is malformed, the API call will fail. Validate JSON syntax before running the node.

Links and References


This summary focuses on the "Data (V1Beta) - Property" resource and the "Run Realtime Report" operation, describing the relevant inputs, outputs, and usage context based on static analysis of the provided source code and property definitions.

Discussion