Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Beta) - Data Stream → Get Data Stream

AI-generated

Overview

This node interacts with the Google Analytics API, specifically supporting a wide range of administrative and data-related operations across different versions (V1Alpha, V1Beta) and data streams. The "Get Data Stream" operation under the "Admin (V1Beta) - Data Stream" resource allows users to retrieve detailed information about a specific data stream within a Google Analytics property.

Typical use cases include:

  • Retrieving configuration details of a data stream for auditing or reporting.
  • Integrating Google Analytics data stream metadata into automated workflows.
  • Managing and monitoring data streams programmatically as part of larger analytics or marketing automation processes.

For example, a user might want to fetch the settings of a web data stream to verify tracking configurations or to synchronize this information with other systems.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property that contains the data stream.
Data Stream ID The identifier of the specific data stream to retrieve information about.
Query Parameters Optional parameters to refine or filter the request. Includes options like:
- Calculated Metric ID: ID for calculated metrics.
- Entity: Level of data access report (property or account).
- Filter: Expression to filter results.
- Names: Names of access bindings to retrieve.
- Page Size: Maximum number of items to return (default 10).
- Page Token: Token for pagination continuation.
- Show Deleted: Whether to include soft-deleted properties (boolean).
- Universal Analytics Property ID: UA property to look up connected GA4 property.
- Update Mask: List of fields to update (snake case).

Output

The output is a JSON array containing the response from the Google Analytics API corresponding to the requested data stream. This typically includes all metadata and configuration details of the specified data stream within the given property.

The structure of the JSON depends on the Google Analytics API's data stream schema but generally includes fields such as:

  • Data stream name and ID
  • Type of data stream (e.g., web, app)
  • Measurement IDs
  • Configuration settings related to enhanced measurement, data retention, etc.

No binary data output is involved in this operation.

Dependencies

  • Requires an OAuth2 API credential for Google Analytics API authentication.
  • The node uses the Google Analytics Admin API endpoints (https://analyticsadmin.googleapis.com/v1beta) for the "Admin (V1Beta)" resources.
  • Proper permissions must be granted to the authenticated account to access the specified property and data stream.

Troubleshooting

  • Missing Credentials: If the OAuth2 credentials are not set or invalid, the node will throw an error indicating missing Google Analytics API credentials.
  • Required Parameters Missing: Errors will occur if mandatory parameters like Property ID or Data Stream ID are not provided.
  • API Errors: Any errors returned by the Google Analytics API (e.g., permission denied, not found) will be surfaced with messages prefixed by "Error calling Google Analytics API".
  • Pagination Issues: When using query parameters like pageToken, ensure tokens are valid to avoid empty or incomplete responses.
  • Soft-Deleted Resources: If querying for deleted resources, ensure the showDeleted parameter is set appropriately.

To resolve these issues:

  • Verify OAuth2 credentials and scopes.
  • Double-check required input parameters.
  • Review API permissions for the authenticated user.
  • Use correct and current pagination tokens.

Links and References

Discussion