Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Alpha) - Property → Fetch Connected GA4 Property

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 resource types. The "Fetch Connected GA4 Property" operation under the "Admin (V1Alpha) - Property" resource allows users to retrieve the Google Analytics 4 (GA4) property that is linked to a specified Universal Analytics (UA) property.

This operation is useful when migrating from Universal Analytics to GA4 or when managing properties that have both UA and GA4 configurations. For example, a user can input a UA property ID and fetch the corresponding connected GA4 property details, facilitating integration or reporting workflows that require knowledge of linked properties.

Properties

Name Meaning
Query Parameters Collection of optional parameters to customize the request. Includes:
- Calculated Metric ID The ID to use for the calculated metric (string).
- Entity Specifies if the data access report is requested at the property or account level (string).
- Filter Expression to filter the results of the request (string).
- Names Names of the access bindings to retrieve (string).
- Page Size Maximum number of report tasks to return (number, default 10).
- Page Token Continuation token for fetching the next page of results (string, treated as password).
- Show Deleted Whether to include soft-deleted ("trashed") properties in results (boolean, default true).
- Universal Analytics Property ID The UA property ID for which to look up the connected GA4 property (string).
- Update Mask List of fields to be updated (snake case field names) (string).

The key input for the "Fetch Connected GA4 Property" operation is the Universal Analytics Property ID, which identifies the UA property whose connected GA4 property is to be fetched.

Output

The node outputs an array of JSON objects representing the response from the Google Analytics API for the requested operation. For the "Fetch Connected GA4 Property" operation, the output JSON contains details about the GA4 property linked to the specified UA property.

The exact structure depends on the API response but typically includes identifiers, names, and configuration details of the connected GA4 property.

No binary data output is produced by this operation.

Dependencies

  • Requires valid Google Analytics API credentials configured in n8n using OAuth2 authentication.
  • The node makes authenticated HTTP requests to Google Analytics Admin API endpoints:
    • Base URL for v1alpha Admin API: https://analyticsadmin.googleapis.com/v1alpha
  • Proper permissions/scopes must be granted to the OAuth2 credential to access property information.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Analytics OAuth2 API credential is configured and selected.
  • Required Parameter Errors: The node validates required IDs such as the Universal Analytics Property ID. If these are missing, it will throw errors indicating which parameter is required.
  • API Request Failures: Errors returned from the Google Analytics API (e.g., permission denied, invalid property ID) will be surfaced with messages prefixed by "Error calling Google Analytics API". Check the provided property ID and OAuth2 scopes.
  • Pagination Issues: When using query parameters like pageSize and pageToken, ensure correct handling of tokens to paginate through large result sets.

Links and References


This summary focuses on the "Fetch Connected GA4 Property" operation within the "Admin (V1Alpha) - Property" resource, describing its purpose, inputs, outputs, dependencies, and common troubleshooting points based on static analysis of the node's source code and provided property definitions.

Discussion