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) - Account Access Binding" resource to list account access bindings. It allows users to retrieve all access bindings associated with a specified Google Analytics account. This is useful for managing and auditing user permissions within an account.

Common scenarios include:

  • Auditing who has access to a Google Analytics account.
  • Integrating access binding data into workflows for compliance or reporting.
  • Automating retrieval of access bindings for multiple accounts.

Example: A marketing team wants to generate a report listing all users and their access levels for a specific Google Analytics account. Using this node operation, they can fetch that data automatically.

Properties

Name Meaning
Account ID The unique identifier of the Google Analytics account for which to list access bindings.
Query Parameters Optional parameters to filter or paginate the list results. Possible options include:
- Calculated Metric ID: ID for a calculated metric.
- Entity: Level of data access report (property or account level).
- Filter: Expression to filter results.
- Names: Specific 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 containing the list of account access bindings retrieved from the Google Analytics API. Each item in the array represents an access binding object with details such as user information, roles, and permissions related to the specified account.

No binary data is output by this node.

Dependencies

  • Requires a valid Google Analytics API OAuth2 credential configured in n8n.
  • The node makes authenticated HTTP requests to the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions on the Google Analytics account are necessary to list access bindings.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that the OAuth2 credentials for Google Analytics API are properly set up and selected.
  • Account ID Required: The operation requires an Account ID; if omitted, the node will throw an error indicating this requirement.
  • API Errors: Errors returned from the Google Analytics API (e.g., permission denied, invalid parameters) will be surfaced with messages prefixed by "Error calling Google Analytics API." Check the API response and verify account permissions and parameter correctness.
  • Pagination: If the result set is large, use the Page Token query parameter to paginate through results.

Links and References

Discussion