Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Data (V1Beta) - Property → Batch Run Pivot Reports

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. The "Batch Run Pivot Reports" operation under the "Data (V1Beta) - Property" resource allows users to run multiple pivot reports in a single batch request for a specified Google Analytics property.

This is beneficial when you need to retrieve complex, multidimensional analytics data efficiently by running several pivot reports simultaneously rather than individually. For example, marketing analysts can use this to generate detailed segmented reports on user behavior, traffic sources, or conversion funnels across multiple dimensions and metrics in one go.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property for which the batch pivot reports will be run.
Query Parameters Optional parameters to customize the request, including:
- Calculated Metric ID: ID for a calculated metric to use.
- 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 (default 10).
- Page Token: Token for fetching next page of results.
- Show Deleted: Whether to include soft-deleted properties (default true).
- 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 containing the batch pivot reports request payload specifying the details of each pivot report to run.

Output

The output is a JSON array where each element corresponds to the response of an individual pivot report run within the batch. Each JSON object contains the structured data returned by the Google Analytics API for that pivot report, including rows, dimension headers, metric headers, and metadata about the report.

No binary data output is indicated for this operation.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • Uses the Google Analytics Data API endpoint https://analyticsdata.googleapis.com/v1beta.
  • Proper permissions on the Google Analytics property are necessary to run batch pivot 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 authorized.
  • Required Parameter Errors: Errors like "Property ID is required" indicate missing mandatory inputs; verify all required fields are filled.
  • API Request Failures: Errors from the Google Analytics API may occur due to invalid query parameters, insufficient permissions, or quota limits. Check the error message for details.
  • JSON Parsing Errors: Ensure the JSON provided in the Request Body is well-formed and matches the expected schema for batch pivot reports.
  • Pagination Issues: When using pagination parameters (pageSize, pageToken), ensure tokens are correctly handled to fetch subsequent pages.

Links and References


This summary focuses on the "Batch Run Pivot Reports" operation of the "Data (V1Beta) - Property" resource as requested, based on static analysis of the node's source code and provided property definitions.

Discussion