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 Account Summaries. The "List Account Summaries" operation returns summaries of all accounts accessible by the authenticated caller. This is useful for scenarios where you want to retrieve a high-level overview of multiple Google Analytics accounts linked to your credentials, such as in account management dashboards or automated reporting workflows.

Practical examples include:

  • Fetching a list of all Google Analytics accounts you have access to for auditing or monitoring.
  • Integrating account summary data into custom analytics or CRM systems.
  • Automating account inventory updates in internal tools.

Properties

Name Meaning
Query Parameters A collection of optional parameters to filter and control the returned account summaries:
- Calculated Metric ID The ID to use for the calculated metric (string).
- Entity Specifies whether the data access report requests at property or account level (string).
- Filter Expression to filter the results of the request (string).
- Names Names of the access bindings to retrieve (string).
- Page Size Maximum number of report tasks to return (number, default 10).
- Page Token Continuation token for fetching the next page of results (string, treated as password).
- Show Deleted Whether to include soft-deleted ("trashed") properties in the results (boolean, default true).
- Universal Analytics Property ID The UA property for which to look up the connected GA4 property (string).
- Update Mask List of fields to be updated (field names must be in snake case) (string).

Output

The node outputs a JSON array where each element corresponds to an account summary object retrieved from the Google Analytics API. Each account summary contains metadata about an accessible Google Analytics account, such as account identifiers, display names, and possibly linked properties.

No binary data output is produced by this node.

Dependencies

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

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.
  • Account ID Required Errors: For other operations (not relevant here), missing required IDs will cause errors; ensure all required IDs are provided.
  • API Request Failures: Errors 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 account summaries exist, use the "Page Token" query parameter to paginate through results.

Links and References


This summary focuses on the "Admin (V1Alpha) - Account Summary" resource and its "List Account Summaries" operation as requested.

Discussion