Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Data (V1Alpha) - Audience List → Query Audience List

AI-generated

Overview

This node integrates with the Google Analytics API, specifically supporting a wide range of administrative and data-related operations across different versions (V1Alpha, V1Beta) and resources. For the Data (V1Alpha) - Audience List resource, the Query Audience List operation retrieves detailed information about a specific audience list within a Google Analytics property.

Typical use cases include:

  • Retrieving audience list details for targeted marketing or analysis.
  • Automating audience data queries to integrate with other marketing tools.
  • Exporting or processing audience data programmatically as part of analytics workflows.

For example, a marketer might use this node to query an audience list by its ID to fetch current membership or attributes, then use that data to tailor ad campaigns or customer segmentation.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property containing the audience list.
Audience List ID The unique identifier of the audience list to query.
Query Parameters Optional parameters to refine the query; includes:
- Calculated Metric ID: ID for any calculated metric to apply.
- Entity: Level of data access report (property or account level).
- 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 pagination to fetch next page.
- Show Deleted: Whether to include soft-deleted ("trashed") properties (boolean).
- Universal Analytics Property ID: UA property to look up connected GA4 property.
- Update Mask: Fields to update in snake case (not typically used in query).
Request Body JSON object for request body payload if needed (not typically required for query operation).

Output

The node outputs a JSON array where each item corresponds to the response from the Google Analytics API for the queried audience list. The structure of the json output field matches the API's response schema for an audience list query, typically including:

  • Audience list metadata (ID, name, description).
  • Membership details or criteria.
  • Status and timestamps.
  • Any additional audience-specific attributes returned by the API.

No binary data output is involved in this operation.

Dependencies

  • Requires valid Google Analytics API credentials configured in n8n using OAuth2 authentication.
  • The node makes authenticated HTTP requests to the Google Analytics Data API (https://analyticsdata.googleapis.com/v1alpha) for the Data (V1Alpha) endpoints.
  • Proper permissions on the Google Analytics property and audience lists are necessary for successful API calls.

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 "Audience List ID is required" indicate missing mandatory inputs. Verify these fields are correctly filled.
  • API Call Failures: Errors returned from the Google Analytics API will be wrapped and shown with messages like "Error calling Google Analytics API: ...". Check the error message for details such as permission issues, invalid IDs, or quota limits.
  • Pagination Issues: When querying large datasets, use the Page Token parameter to paginate through results properly.
  • Soft-Deleted Data: If expected data is missing, verify whether the Show Deleted flag is set appropriately to include or exclude soft-deleted entities.

Links and References


This summary focuses on the Data (V1Alpha) - Audience List resource and the Query Audience List operation as requested, based on static analysis of the provided source code and input properties.

Discussion