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 managing BigQuery Links within a property. The "List BigQuery Links" operation retrieves all BigQuery links associated with a specified Google Analytics property.

This node is beneficial when you want to programmatically access and manage the integration between Google Analytics properties and BigQuery datasets. For example, it can be used to audit existing BigQuery export configurations or to automate workflows that depend on the presence of these links.

Practical example:

  • Automatically list all BigQuery export links for a given Google Analytics property to verify data export setups.
  • Use the retrieved list to trigger further actions such as monitoring export status or updating configurations.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property whose BigQuery links you want to list.
Query Parameters Optional parameters to filter or paginate the results. Includes:
- Calculated Metric ID: ID for calculated metrics (string)
- Entity: Level of data access report (property or account) (string)
- Filter: Expression to filter results (string)
- Names: Names of access bindings to retrieve (string)
- Page Size: Maximum number of results to return (number, default 10)
- Page Token: Token for fetching next page of results (string)
- Show Deleted: Whether to include soft-deleted properties (boolean, default true)
- Universal Analytics Property ID: UA property to look up connected GA4 property (string)
- Update Mask: List of fields to update (snake case string)

Output

The output is a JSON array where each item represents a BigQuery link object associated with the specified property. Each object contains details about a BigQuery link, such as its ID, configuration, and metadata as returned by the Google Analytics Admin API.

No binary data is output by this node.

Dependencies

  • Requires an OAuth2 API credential for Google Analytics with appropriate permissions to access the Admin API.
  • The node makes HTTP requests to the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper setup of the OAuth2 credentials in n8n is necessary for authentication.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that the OAuth2 credentials are configured correctly in n8n and linked to this node.
  • Required Parameter Errors: The node requires the Property ID to be set for this operation. If missing, it will throw an error indicating the missing parameter.
  • API Errors: Errors from the Google Analytics API will be caught and rethrown with messages like "Error calling Google Analytics API: [error message]". Check the API response and ensure the authenticated user has sufficient permissions.
  • Pagination: If the result set is large, use the Page Token and Page Size query parameters to paginate through results.

Links and References

Discussion