Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node integrates with the Google Analytics API, specifically targeting the Admin (V1Alpha) resource for managing Event Edit Rules. The "Update Event Edit Rule" operation allows users to modify existing event edit rules within a specified data stream of a Google Analytics property. This is useful for scenarios where you need to adjust how events are edited or processed in your analytics setup without recreating the entire rule.

Practical examples include:

  • Updating conditions or parameters of an event edit rule to refine event tracking.
  • Modifying event transformations or filters applied to incoming event data.
  • Adjusting event edit rules as part of ongoing analytics configuration management.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property containing the data stream and event edit rule.
Data Stream ID The identifier of the data stream within the property where the event edit rule exists.
Event Edit Rule ID The identifier of the specific event edit rule to update.
Query Parameters Optional query parameters to customize the request, such as filtering or pagination options.
Request Body JSON object representing the updated details of the event edit rule to be sent in the request.

Output

The output is a JSON array containing the response from the Google Analytics API after updating the event edit rule. This typically includes the updated event edit rule object with its current configuration and metadata.

No binary data output is involved.

Dependencies

  • Requires a valid Google Analytics API OAuth2 credential configured in n8n.
  • The node makes authenticated HTTP requests to the Google Analytics Admin API endpoint: https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions on the Google Analytics account/property are necessary to update event edit rules.

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 Errors: Errors like "Property ID is required," "Data Stream ID is required," or "Event Edit Rule ID is required" indicate missing essential input parameters. Verify that these IDs are correctly provided.
  • API Errors: Any error returned by the Google Analytics API will be wrapped and shown with the message prefix "Error calling Google Analytics API." Check the detailed error message and stack trace for specifics.
  • Invalid JSON in Request Body: Ensure the JSON provided in the Request Body field is well-formed and matches the expected schema for an event edit rule update.

Links and References

Discussion