Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Data (V1Beta) - Property → Run 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 Report," it allows users to run customized reports on Google Analytics properties using the latest v1beta data API.

Typical use cases include:

  • Running detailed analytics reports on user behavior and traffic for a specific Google Analytics property.
  • Automating report generation within workflows to analyze website or app performance.
  • Integrating Google Analytics data into broader automation pipelines for marketing, sales, or product analytics.

Example: A marketer could use this node to run a report on a GA4 property to extract user engagement metrics and feed that data into a dashboard or CRM system automatically.

Properties

Name Meaning
Property ID The unique identifier of the Google Analytics property to run the report against.
Query Parameters Optional parameters to customize the report request, including:
- Calculated Metric ID: ID for any calculated metric to include in the report.
- Entity: Level of data access (property or account level).
- Filter: Expression to filter the report results.
- Names: Names of access bindings to retrieve (if applicable).
- Page Size: Maximum number of report tasks to return (pagination control).
- Page Token: Token for fetching the next page of results (pagination control).
- Show Deleted: Whether to include soft-deleted ("trashed") properties in results.
- Universal Analytics Property ID: UA property to look up connected GA4 property.
- Update Mask: List of fields to update (in snake case).
Request Body JSON object representing the body of the report request, allowing full customization of the report query according to the Google Analytics Data API specification.

Output

The node outputs an array of JSON objects corresponding to the response from the Google Analytics API report run endpoint. The structure of the json output field matches the Google Analytics Data API's report response format, which typically includes:

  • Dimension headers and values
  • Metric headers and values
  • Metadata about the report
  • Pagination tokens if applicable

No binary data is output by this node.

Dependencies

  • Requires valid Google Analytics OAuth2 credentials configured in n8n to authenticate API requests.
  • Uses the Google Analytics Data API endpoints (https://analyticsdata.googleapis.com/v1beta) for running reports.
  • The node dynamically constructs API URLs based on the selected resource and operation.

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 connected.
  • Required Parameter Errors: The node validates required IDs such as Property ID before making requests. If you see errors like "Property ID is required," verify that you have provided all necessary input parameters.
  • API Request Failures: Errors returned from the Google Analytics API will be wrapped and shown with the message prefix "Error calling Google Analytics API." Check the error details for issues like invalid parameters, insufficient permissions, or quota limits.
  • Pagination Handling: When dealing with large datasets, use the Page Size and Page Token query parameters to paginate through results correctly.

Links and References


This summary focuses on the "Data (V1Beta) - Property" resource and the "Run Report" operation, describing how to configure and use the node to run reports via the Google Analytics Data API.

Discussion