Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node integrates with the Google Analytics API, specifically targeting the Admin (V1Alpha) Audience resource to list audiences within a specified property. It allows users to retrieve detailed information about audiences configured in their Google Analytics properties. This is useful for marketers and analysts who want to manage or analyze audience segments directly from their workflows.

A common scenario is automating the retrieval of audience lists for reporting or syncing with other marketing platforms. For example, a user might use this node to fetch all audiences from a property and then update a CRM system or trigger targeted campaigns based on those audiences.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property whose audiences you want to list.
Query Parameters Optional parameters to filter or paginate the list of audiences. Includes:
- Calculated Metric ID: Filter by calculated metric ID.
- Entity: Specify data access report level (property or account).
- Filter: Expression to filter results.
- Names: Names of access bindings to retrieve.
- Page Size: Maximum number of audiences to return (default 10).
- Page Token: Token for fetching the 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 be updated (snake case).

Output

The output is a JSON array where each element represents an audience object retrieved from the Google Analytics property. The structure corresponds to the Google Analytics API's audience representation, typically including details such as audience ID, name, description, and configuration settings.

No binary data is output by this node.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials 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/property are necessary to list audiences.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics API are properly set up and selected.
  • Required Parameter Errors: Errors like "Property ID is required" indicate missing mandatory input. Make sure to provide the Property ID when listing audiences.
  • API Request Failures: Network issues or insufficient permissions can cause API call failures. Check your internet connection and verify that the authenticated user has access to the specified property.
  • Pagination Handling: If many audiences exist, use the "Page Token" query parameter to paginate through results.

Links and References

Discussion