Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Beta) - Custom Dimension → List Custom Dimensions

AI-generated

Overview

This node integrates with the Google Analytics API, specifically targeting the Admin (V1Beta) resource for managing Custom Dimensions within a property. The "List Custom Dimensions" operation retrieves a list of custom dimensions configured in a specified Google Analytics property.

This node is beneficial when you want to programmatically access and manage custom dimensions data from Google Analytics properties, such as for reporting, auditing, or synchronization purposes.

Practical example:

  • Automatically fetch all custom dimensions for a given property to analyze which dimensions are active or to export their configurations for documentation or migration.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property whose custom dimensions you want to list.
Query Parameters Optional parameters to filter or paginate the results. Possible options include:
- Calculated Metric ID: Filter by calculated metric ID.
- Entity: Specify if the report is at property or account level.
- Filter: Expression to filter results.
- Names: Names of access bindings to retrieve.
- Page Size: Maximum number of results to return (default 10).
- Page Token: Token for fetching next page of results.
- Show Deleted: Whether to include soft-deleted ("trashed") properties (default true).
- Universal Analytics Property ID: UA property to look up connected GA4 property.
- Update Mask: List of fields to update (snake case).

Output

The output is a JSON array where each item represents a custom dimension object retrieved from the Google Analytics property. Each object contains details about a custom dimension, such as its ID, name, scope, and other configuration attributes as defined by the Google Analytics API.

No binary data output is involved.

Dependencies

  • Requires an OAuth2 API credential for Google Analytics API authentication.
  • The node makes HTTP requests to the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1beta.
  • Proper permissions on the Google Analytics property are required to list custom dimensions.

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 in n8n.
  • Required Parameter Errors: The node validates required parameters like Property ID. If missing, it will throw errors such as "Property ID is required." Make sure to provide these mandatory inputs.
  • 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 insufficient permissions, invalid IDs, or quota limits.
  • Pagination: If the result set is large, use the "Page Token" query parameter to paginate through results.

Links and References

Discussion