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 provides integration with the Google Analytics API, allowing users to perform a wide range of administrative and data-related operations on Google Analytics accounts, properties, and related resources. It supports multiple API versions (v1alpha, v1beta) and different resource types such as accounts, properties, audiences, data streams, custom metrics, and more.
Common scenarios where this node is beneficial include:
- Managing Google Analytics accounts and properties programmatically.
- Creating, updating, or deleting various Google Analytics configurations like audiences, custom dimensions, and data streams.
- Running reports and querying analytics data.
- Managing access bindings and user permissions.
- Automating administrative tasks such as linking Google Ads or Firebase projects.
Practical examples:
- Automatically creating new Google Analytics properties when onboarding new clients.
- Fetching account summaries or running access reports for auditing purposes.
- Updating custom metrics or channel groups based on business rules.
- Exporting audience lists to Google Sheets for marketing campaigns.
Properties
Name | Meaning |
---|---|
Query Parameters | A collection of optional parameters to customize the API request. Options include: |
- Calculated Metric ID: The ID for a calculated metric. | |
- 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 (default 10). | |
- Page Token: Continuation token for pagination. | |
- 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). |
Note: The node also supports many other input properties depending on the selected Resource and Operation, such as Account ID, Property ID, Access Binding ID, Data Stream ID, Audience ID, etc., which are required for specific API calls.
Output
The node outputs an array of JSON objects representing the response from the Google Analytics API for each input item processed. The structure of the output JSON depends on the specific API endpoint called and the operation performed.
If the operation involves fetching data (e.g., listing accounts, getting a property), the output will contain the corresponding resource details in JSON format.
If the operation involves creating, updating, or deleting resources, the output will typically contain confirmation or the updated resource representation.
The node does not explicitly handle binary data output.
Dependencies
- Requires an OAuth2 API credential configured for Google Analytics API access.
- The node uses the Google Analytics API endpoints, including:
https://analyticsadmin.googleapis.com/v1alpha
https://analyticsadmin.googleapis.com/v1beta
https://analyticsdata.googleapis.com/v1alpha
https://analyticsdata.googleapis.com/v1beta
https://www.googleapis.com/analytics/v3/userDeletion
Ensure that the OAuth2 credentials have appropriate scopes and permissions to perform the desired operations.
Troubleshooting
- Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," verify that the OAuth2 credentials are properly set up and linked in n8n.
- Required Parameter Missing: Many operations require specific IDs (e.g., Account ID, Property ID). Errors indicating missing IDs mean you must provide these inputs.
- API Request Errors: Errors returned by the Google Analytics API will be wrapped with a message starting "Error calling Google Analytics API." Check the error message and stack trace for details.
- Pagination Issues: When using query parameters like
pageToken
, ensure correct handling of tokens to fetch subsequent pages. - Permission Denied: Ensure the authenticated user has sufficient permissions for the requested operation.
Links and References
- Google Analytics Admin API Documentation
- Google Analytics Data API Documentation
- Google OAuth2 Setup Guide
- Google Analytics API Reference
This summary covers the default resource and operation context, focusing on the provided input properties and the general behavior of the node's execute method.