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) Account resource to perform the "Search Change History Events" operation. It allows users to search through all changes made to a Google Analytics account or its child entities by applying various filters and query parameters.

Common scenarios for this node include auditing account modifications, tracking configuration changes over time, and monitoring access bindings or property-level updates. For example, an analytics administrator can use this node to retrieve a history of changes to user permissions or property settings within a specific account.

Properties

Name Meaning
Query Parameters A collection of optional filters and controls to refine the search results:
- Calculated Metric ID: The ID to use for the calculated metric
- Entity: Specify whether to request data at the property level or account level
- Filter: An expression to filter the results
- Names: Names of access bindings to retrieve
- Page Size: Maximum number of report tasks to return (default 10)
- Page Token: Continuation token for fetching next page of results
- Show Deleted: Whether to include soft-deleted ("trashed") properties in results (default true)
- Universal Analytics Property ID: UA property to look up connected GA4 property
- Update Mask: List of fields to be updated (in snake case)
Request Body JSON object representing the request body payload for the API call. Used to specify detailed search criteria or filters.

Output

The output is a JSON array containing the search results from the Google Analytics API's change history events endpoint. Each item in the array represents a change event matching the specified filters and query parameters. The structure corresponds directly to the API response for change history events, typically including details such as:

  • The type of change event
  • The affected resource
  • The actor who made the change
  • Timestamps
  • Additional metadata about the change

No binary data output is produced by this node.

Dependencies

  • Requires a valid Google Analytics API OAuth2 credential configured in n8n.
  • The node makes authenticated HTTP requests to the Google Analytics Admin API v1alpha endpoint.
  • No additional external dependencies are required beyond the OAuth2 credential.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that a valid OAuth2 credential for Google Analytics API is configured and selected.
  • Required Parameter Errors: The node validates required IDs such as Account ID before making requests. Missing these will cause errors like "Account ID is required." Provide all necessary identifiers based on the operation.
  • API Errors: Errors returned from the Google Analytics API will be wrapped and shown with the message prefix "Error calling Google Analytics API." Check the error message and stack trace for details.
  • Pagination: When retrieving large result sets, use the "Page Token" query parameter to paginate through results.

Links and References

Discussion