Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Beta) - Property → List Properties

AI-generated

Overview

This node integrates with the Google Analytics API, specifically supporting the Admin (V1Beta) resource for managing properties. The "List Properties" operation retrieves a list of properties associated with an account, allowing users to query and filter these properties based on various parameters.

Common scenarios where this node is beneficial include:

  • Automating the retrieval of Google Analytics properties for reporting or auditing.
  • Integrating property data into workflows that require dynamic access to Google Analytics configurations.
  • Filtering properties by specific criteria such as inclusion of deleted properties or pagination controls.

For example, a user might use this node to fetch all active properties under a Google Analytics account, optionally including soft-deleted ones, and then process or analyze them further in their workflow.

Properties

Name Meaning
Calculated Metric ID The ID to use for the calculated metric
Entity Specifies whether the data access report requests at the property level or account level
Filter An expression used to filter the results of the request
Names The names of the access bindings to retrieve
Page Size The maximum number of report tasks to return (default 10)
Page Token Continuation token for fetching the next page of results
Show Deleted Whether to include soft-deleted (i.e., "trashed") properties in the results (default true)
Universal Analytics Property ID The UA property for which to look up the connected GA4 property
Update Mask A comma-separated list of fields to be updated (field names must be in snake case)

These properties are provided as query parameters to customize the listing of properties.

Output

The output is a JSON array containing the response from the Google Analytics API corresponding to the requested properties. Each item in the array represents a property object with its details as returned by the API.

The node does not output binary data.

Dependencies

  • Requires an OAuth2 API credential for Google Analytics to authenticate API requests.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1beta for the Admin (V1Beta) resource.
  • Proper configuration of the OAuth2 credentials within n8n is necessary for successful API calls.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing Google Analytics API credentials, ensure that the OAuth2 credential is properly set up and linked in the node.
  • Required Parameter Errors: Many operations require specific IDs (e.g., Account ID, Property ID). If these are missing, the node will throw errors indicating which parameter is required. Make sure to provide all mandatory parameters.
  • API Request Failures: Errors returned from the Google Analytics API will be wrapped and presented with the message "Error calling Google Analytics API". Check the detailed error message and stack trace for specifics.
  • Pagination Issues: When using Page Token and Page Size, ensure tokens are correctly handled to paginate through results without missing or duplicating entries.

Links and References

Discussion