Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Beta) - Property → Update Property

AI-generated

Overview

This node integrates with the Google Analytics API, specifically supporting a wide range of administrative and data management operations across different versions (V1Alpha, V1Beta) and data APIs. The "Update Property" operation under the "Admin (V1Beta) - Property" resource allows users to update settings or attributes of a Google Analytics property.

Typical use cases include automating updates to Google Analytics properties such as changing configuration settings, updating attribution or data retention settings, or modifying other property-level details programmatically within an n8n workflow. This is useful for managing multiple properties efficiently without manual intervention in the Google Analytics UI.

Example: Automatically update the data retention settings of a property when certain conditions are met in your workflow.

Properties

Name Meaning
Property ID The unique identifier of the Google Analytics property to update.
Query Parameters Optional parameters to refine the request, including:
- 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: Max number of report tasks to return
- Page Token: Continuation token for pagination
- Show Deleted: Whether to include soft-deleted properties
- Universal Analytics Property ID: UA property linked to GA4
- Update Mask: Comma-separated list of fields to update (in snake_case)
Request Body JSON object containing the fields and values to update on the property.

Output

The node outputs a JSON array where each element corresponds to the response from the Google Analytics API for the executed update operation. The structure of the JSON depends on the API's response but generally includes the updated property details or confirmation of the update.

No binary data output is produced by this node.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • The node uses the Google Analytics Admin API endpoints (https://analyticsadmin.googleapis.com/v1beta for V1Beta resources).
  • Proper permissions/scopes must be granted to the OAuth2 credential to perform property updates.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that the OAuth2 credentials for Google Analytics are properly set up and connected.
  • Required Parameter Missing: Errors like "Property ID is required" indicate that mandatory input parameters were not provided. Verify all required fields are filled.
  • 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 requests.
  • Update Mask Usage: When using updateMask, ensure field names are correctly formatted in snake_case and correspond to updatable fields; otherwise, the API may reject the request.

Links and References


This summary focuses on the "Admin (V1Beta) - Property" resource and the "Update Property" operation as requested, based on static analysis of the provided source code and property definitions.

Discussion