Actions84
- Admin (V1Alpha) - Account Actions
- Admin (V1Alpha) - Account Access Binding Actions
- Admin (V1Alpha) - Account Summary Actions
- Admin (V1Alpha) - AdSense Link Actions
- Admin (V1Alpha) - Audience Actions
- Admin (V1Alpha) - BigQuery Link Actions
- Admin (V1Alpha) - Calculated Metric Actions
- Admin (V1Alpha) - Channel Group Actions
- Admin (V1Alpha) - Custom Dimension Actions
- Admin (V1Alpha) - Custom Metric Actions
- Admin (V1Alpha) - Data Stream Actions
- Admin (V1Alpha) - Display & Video 360 Advertiser Link Actions
- Admin (V1Alpha) - Display & Video 360 Advertiser Link Proposal Actions
- Approve Display & Video 360 Advertiser Link Proposal
- Cancel Display & Video 360 Advertiser Link Proposal
- Create Display & Video 360 Advertiser Link Proposal
- Delete Display & Video 360 Advertiser Link Proposal
- Get Display & Video 360 Advertiser Link Proposal
- List Display & Video 360 Advertiser Link Proposals
- Admin (V1Alpha) - Event Create Rule Actions
- Admin (V1Alpha) - Event Edit Rule Actions
Overview
This node interacts with the Google Analytics API, specifically supporting the "Admin (V1Alpha) - Custom Metric" resource and its operations. The "Get Custom Metric" operation allows users to retrieve detailed information about a specific custom metric defined within a Google Analytics property.
Use cases include:
- Fetching metadata and configuration details of a custom metric for reporting or auditing.
- Integrating Google Analytics custom metrics data into automated workflows.
- Validating the existence and properties of custom metrics before using them in analytics or dashboards.
For example, a marketing analyst might use this node to programmatically retrieve the definition of a custom metric to ensure it is correctly set up before running reports that depend on it.
Properties
Name | Meaning |
---|---|
Property ID | The identifier of the Google Analytics property where the custom metric is defined. |
Custom Metric ID | The unique identifier of the custom metric to retrieve. |
Query Parameters | Optional additional parameters to refine the request, including: |
- Calculated Metric ID: ID for a calculated metric to use. | |
- Entity: Level of data access report (property or account). | |
- Filter: Expression to filter results. | |
- Names: Names of access bindings to retrieve. | |
- Page Size: Maximum number of report tasks to return (number). | |
- Page Token: Continuation token for pagination. | |
- Show Deleted: Whether to include soft-deleted properties (boolean). | |
- Universal Analytics Property ID: UA property to look up connected GA4 property. | |
- Update Mask: List of fields to update (snake case). |
Output
The node outputs JSON data representing the retrieved custom metric's details from the Google Analytics API. This includes all metadata and configuration attributes associated with the specified custom metric.
The output is an array of JSON objects, each corresponding to one API response per input item. There is no binary data output.
Example output structure (simplified):
{
"name": "properties/{propertyId}/customMetrics/{customMetricId}",
"parameterName": "metric_name",
"displayName": "Custom Metric Display Name",
"description": "Description of the custom metric",
"measurementUnit": "UNIT_TYPE",
"scope": "SCOPE_TYPE",
"restrictedMetricType": "RESTRICTED_TYPE",
"type": "METRIC_TYPE",
"calculationFormula": "formula if any"
}
Dependencies
- Requires valid Google Analytics API OAuth2 credentials configured in n8n.
- Uses the Google Analytics Admin API v1alpha endpoint (
https://analyticsadmin.googleapis.com/v1alpha
). - The node requires network access to Google's APIs.
Troubleshooting
- Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials", ensure you have configured OAuth2 credentials for Google Analytics in n8n.
- Required Parameter Missing: Errors like "Property ID is required" or "Custom Metric ID is required" indicate mandatory inputs are missing. Provide these IDs to proceed.
- API Request Failures: Errors returned by the Google Analytics API will be wrapped and shown as "Error calling Google Analytics API". Check the error message and stack trace for details.
- Pagination Issues: When using query parameters like
pageToken
, ensure tokens are valid and used correctly to paginate through large result sets.
Links and References
This summary focuses on the "Admin (V1Alpha) - Custom Metric" resource and the "Get Custom Metric" operation as requested.