Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node interacts with the Google Analytics API, specifically targeting the "Admin (V1Alpha) - Event Edit Rule" resource to list event edit rules within a data stream of a property. It allows users to retrieve configurations that define how events are edited or modified in Google Analytics.

Common scenarios where this node is beneficial include:

  • Auditing or reviewing existing event edit rules configured for a specific data stream.
  • Automating the retrieval of event edit rules for reporting or synchronization purposes.
  • Integrating Google Analytics event management into broader workflows without manual API calls.

For example, a marketing analyst might use this node to fetch all event edit rules for a particular data stream to ensure compliance with data governance policies or to prepare documentation.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property containing the data stream.
Data Stream ID The identifier of the data stream within the property where event edit rules are managed.
Query Parameters Optional parameters to filter or paginate the list request. Includes:
- Calculated Metric ID: ID for calculated metrics.
- 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 items 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 (snake case).

Output

The node outputs a JSON array where each element represents an event edit rule retrieved from the specified data stream. Each event edit rule object contains details as defined by the Google Analytics Admin API, such as rule identifiers, conditions, and actions applied to events.

No binary data output is involved.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • The node uses the Google Analytics Admin API v1alpha endpoint (https://analyticsadmin.googleapis.com/v1alpha).
  • Proper permissions on the Google Analytics account and property to read event edit rules.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics API are properly set up and selected.
  • Required Parameter Errors: Errors like "Property ID is required" or "Data Stream ID is required" indicate missing mandatory inputs. Provide these IDs to proceed.
  • API Request Failures: Errors returned from the Google Analytics API will be surfaced with messages prefixed by "Error calling Google Analytics API." Check the error message and stack trace for details.
  • Pagination Issues: When retrieving large lists, use Page Size and Page Token query parameters to handle pagination correctly.

Links and References

Discussion