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) - Account resource to run an access report operation. The "Run Access Report" operation generates a customized report of data access records for a specified account. This is useful for auditing and monitoring who has accessed what data within a Google Analytics account.

Common scenarios include:

  • Auditing user access to Google Analytics accounts.
  • Generating reports on data access patterns for compliance or security reviews.
  • Monitoring changes in access bindings or permissions over time.

For example, a user might run this node to retrieve a detailed report on all access events related to a particular Google Analytics account, filtering by specific criteria such as entity type or date range.

Properties

Name Meaning
Query Parameters A collection of optional parameters to customize the access report request:
- 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: Expression to filter the results
- Names: Names of the access bindings to retrieve
- Page Size: Maximum number of report tasks to return (default 10)
- Page Token: Continuation token for pagination
- 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 update (snake case field names)
Request Body JSON object representing the body of the request sent to the API. This contains the details of the access report query.

Output

The node outputs a JSON array where each element corresponds to the parsed JSON response from the Google Analytics API for the access report run request. The structure of the output JSON depends on the API's response format for the access report, typically including details about data access records such as users, access times, entities accessed, and other metadata.

No binary data output is produced by this node.

Dependencies

  • Requires an OAuth2 API credential configured for Google Analytics API access.
  • The node uses the Google Analytics Admin API endpoints (https://analyticsadmin.googleapis.com/v1alpha) for the Admin (V1Alpha) resources.
  • Proper permissions must be granted to the OAuth2 credential to access account data and run access reports.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that valid OAuth2 credentials are configured and selected in the node.
  • Required Parameter Errors: The node validates required parameters like Account ID for this operation. If missing, it will throw errors such as "Account ID is required." Make sure to provide all mandatory IDs.
  • API Request Failures: 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 Handling: If the report returns paginated results, use the "Page Token" query parameter to fetch subsequent pages.

Links and References

Discussion