Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Alpha) - Property → List Properties

AI-generated

Overview

This node integrates with the Google Analytics API, specifically targeting the Admin (V1Alpha) resource for managing properties. The "List Properties" operation allows users to retrieve a list of properties within their Google Analytics account. This is useful for scenarios where you want to programmatically access and manage your Google Analytics properties, such as auditing available properties, syncing property data with other systems, or automating reporting workflows.

For example, a marketing analyst could use this node to fetch all properties under an account to generate a consolidated report or to verify property configurations across multiple accounts.

Properties

Name Meaning
Query Parameters A collection of optional parameters to filter and control the listing of properties:
- Calculated Metric ID The ID to use for the calculated metric (string)
- Entity Specifies whether the data access report requests at the property level or account level (string)
- Filter An expression to filter the results of the request (string)
- Names The 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 the results (boolean, default true)
- Universal Analytics Property ID The UA property for which to look up the connected GA4 property (string)
- Update Mask List of fields to be updated (field names must be in snake case) (string)

These query parameters allow fine-tuning the request to the Google Analytics API when listing properties.

Output

The output is a JSON array containing the response from the Google Analytics API for the requested properties. Each item in the array corresponds to a property object returned by the API, including details such as property identifiers, settings, and metadata.

No binary data output is produced by this node.

Dependencies

  • Requires an OAuth2 API credential for Google Analytics API authentication.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha for the Admin (V1Alpha) resource.
  • Proper configuration of the OAuth2 credentials in n8n is necessary to authenticate API requests.

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 configuration.
  • Required Parameter Errors: The node validates required parameters such as Property ID for many operations. For the "List Properties" operation, ensure that any required parameters are provided if applicable.
  • API Request Failures: Errors returned from the Google Analytics API will be wrapped and shown with messages like "Error calling Google Analytics API". Check the message and stack trace for details. Common issues include invalid tokens, insufficient permissions, or malformed requests.
  • Pagination Handling: When using Page Token and Page Size, ensure correct handling of pagination tokens to retrieve all results if needed.

Links and References


This summary focuses on the "Admin (V1Alpha) - Property" resource and the "List Properties" operation as requested.

Discussion