Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node interacts with the Google Analytics API, specifically supporting a wide range of administrative and data operations. The "Update Data Stream" operation under the "Admin (V1Alpha) - Data Stream" resource allows users to update settings or configurations of a specific data stream within a Google Analytics property.

Typical use cases include modifying data stream attributes such as measurement settings, data redaction settings, or other configurable parameters related to how data is collected and processed for a given property. This is useful for analytics administrators who need to programmatically manage their data streams without manual intervention in the Google Analytics UI.

For example, you might update enhanced measurement settings on a web data stream to enable or disable automatic tracking of page views or scrolls.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property that owns the data stream.
Data Stream ID The identifier of the data stream to be updated within the specified property.
Query Parameters Optional additional query parameters such as updateMask (fields to update), filters, etc.
Request Body JSON object containing the fields and values to update on the data stream resource.

Details on Query Parameters options:

  • Calculated Metric ID: ID for calculated metrics (not typically used for data stream update).
  • Entity: Level of data access report (property/account level).
  • Filter: Expression to filter results.
  • Names: Names of access bindings to retrieve.
  • Page Size: Max number of items to return.
  • Page Token: Token for pagination.
  • Show Deleted: Whether to include soft-deleted properties.
  • Universal Analytics Property ID: UA property linked to GA4 property.
  • Update Mask: Comma-separated list of snake_case field names specifying which fields to update.

Output

The output is a JSON array where each element corresponds to the response from the Google Analytics API for the update request. The structure of the JSON depends on the API's response for the updated data stream resource, typically including the updated data stream details such as its ID, name, type, and configuration settings.

No binary data output is produced by this operation.

Dependencies

  • Requires an OAuth2 credential configured for Google Analytics API access.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions are required on the Google Analytics account to update data streams.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that a valid OAuth2 credential for Google Analytics is configured and selected.
  • Required Parameter Errors: Errors like "Property ID is required" or "Data Stream ID is required" indicate missing mandatory inputs; verify these are provided.
  • 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 for details such as permission issues, invalid IDs, or malformed request body.
  • Update Mask Usage: If updates do not apply as expected, ensure the updateMask query parameter correctly lists the fields intended for update in snake_case format.

Links and References


This summary focuses on the "Update Data Stream" operation under the "Admin (V1Alpha) - Data Stream" resource, describing its purpose, input properties, output, dependencies, and common troubleshooting points based on static analysis of the node implementation.

Discussion