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 perform operations related to account access bindings. The "Get Account Access Binding" operation retrieves detailed information about a specific access binding within a Google Analytics account.

Common scenarios for this node include:

  • Retrieving permissions and access details for a user or group on a particular Google Analytics account.
  • Auditing who has access to an account and what level of access they possess.
  • Integrating access control checks into automated workflows that manage Google Analytics accounts.

Practical example:

  • An organization wants to verify the access rights of a team member on a Google Analytics account before granting additional permissions. This node can fetch the current access binding details to inform decision-making.

Properties

Name Meaning
Account ID The unique identifier of the Google Analytics account to which the access binding belongs.
Access Binding ID The unique identifier of the specific access binding to retrieve information about.
Query Parameters Optional parameters to refine or filter the request. Includes:
- Calculated Metric ID: 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: Token for fetching next page of results.
- Show Deleted: Whether to include soft-deleted ("trashed") properties (boolean).
- 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 corresponds to the response from the Google Analytics API for the requested access binding(s). The JSON structure contains detailed information about the access binding, such as user or group identifiers, roles, and permissions associated with the binding.

No binary data output is produced by this node.

Dependencies

  • Requires valid Google Analytics API credentials with OAuth2 authentication configured in n8n.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions on the Google Analytics account are necessary to retrieve access binding information.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing Google Analytics API credentials, ensure that OAuth2 credentials are properly set up and linked in n8n.
  • Required Parameter Missing: Errors indicating missing "Account ID" or "Access Binding ID" mean these inputs must be provided for the operation to succeed.
  • API Permission Denied: If the API returns permission errors, verify that the authenticated user has sufficient rights to view access bindings on the specified account.
  • Invalid IDs: Providing incorrect or non-existent Account ID or Access Binding ID will result in API errors; double-check these values.
  • Rate Limits: Google Analytics API enforces rate limits; if exceeded, requests may fail temporarily.

Links and References

Discussion