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) resource for managing Event Create Rules. The "List Event Create Rules" operation retrieves a list of event creation rules configured within a specific data stream of a property in Google Analytics.

Use cases include:

  • Automating the retrieval of all event create rules for auditing or reporting.
  • Integrating event rule data into workflows for monitoring or synchronization.
  • Managing and reviewing event creation configurations programmatically.

For example, you might use this node to fetch all event create rules for a given property and data stream to ensure compliance with tracking standards or to feed this data into a dashboard.

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 create rules exist.
Query Parameters Optional parameters to filter or paginate the results. 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 results 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 create rule retrieved from the specified data stream. Each event create rule object contains details as defined by the Google Analytics Admin API, such as rule identifiers, conditions, and actions related to event creation.

No binary data is output by this node.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • The node uses the Google Analytics Admin API v1alpha endpoint.
  • Network access to https://analyticsadmin.googleapis.com/v1alpha is required.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics 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 Handling: If many event create rules exist, use the Page Token query parameter to paginate through results.

Links and References

Discussion