Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node interacts with the Google Analytics API, specifically supporting a wide range of administrative and data management operations across different versions (v1alpha, v1beta) and data types. For the Admin (V1Alpha) - Calculated Metric resource, the node allows you to manage calculated metrics within a Google Analytics property.

The Get Calculated Metric operation retrieves details about a specific calculated metric defined in a given property. This is useful for scenarios where you want to programmatically access custom metrics that are computed from other metrics or dimensions in your Google Analytics data.

Practical examples:

  • Fetching a calculated metric's configuration to use it in reporting workflows.
  • Validating the existence and details of a calculated metric before running reports.
  • Integrating calculated metric metadata into dashboards or automated analytics pipelines.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property containing the calculated metric.
Calculated Metric ID The unique identifier of the calculated metric to retrieve.
Query Parameters Optional parameters to customize the request, including:
- calculatedMetricId: ID for the calculated metric (string)
- entity: Level of data access report (property or account level) (string)
- filter: Expression to filter results (string)
- names: Names of access bindings to retrieve (string)
- pageSize: Maximum number of report tasks to return (number, default 10)
- pageToken: Token for fetching next page of results (string)
- showDeleted: Whether to include soft-deleted properties (boolean, default true)
- universalAnalyticsPropertyId: UA property to look up connected GA4 property (string)
- updateMask: List of fields to update (snake case string)

Output

The node outputs a JSON array where each item corresponds to the response from the Google Analytics API for the requested calculated metric. The JSON structure contains all details of the calculated metric as returned by the API, such as its name, expression, formatting type, and other metadata.

No binary data output is involved in this operation.

Dependencies

  • Requires an OAuth2 credential configured for Google Analytics API access.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions on the Google Analytics property are necessary to retrieve calculated metric information.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that a valid OAuth2 credential for Google Analytics API is configured and selected.
  • Required Parameter Errors: Errors like "Property ID is required" or "Calculated Metric ID is required" indicate missing mandatory inputs. Verify that these IDs are correctly provided.
  • API Request Failures: Errors returned from the Google Analytics API may include permission issues, invalid IDs, or network problems. Check the error message for details and verify API access rights and input correctness.
  • Pagination Issues: When using query parameters like pageSize and pageToken, ensure correct handling of pagination tokens to avoid incomplete data retrieval.

Links and References


This summary focuses on the Admin (V1Alpha) - Calculated Metric resource and the Get Calculated Metric operation as requested, based on static analysis of the provided source code and property definitions.

Discussion