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 within a data stream. The "Delete Event Edit Rule" operation allows users to delete a specific event edit rule associated with a given property and data stream in Google Analytics.

Common scenarios where this node is beneficial include:

  • Automating the cleanup or management of event edit rules in Google Analytics properties.
  • Integrating Google Analytics administration tasks into broader workflows, such as removing outdated or incorrect event edit rules programmatically.
  • Managing event configurations at scale across multiple properties and data streams.

For example, a user might use this node to delete an obsolete event edit rule from a specific data stream in a property after a campaign ends or when restructuring event tracking.

Properties

Name Meaning
Property ID The unique identifier of the Google Analytics property where the event edit rule exists.
Data Stream ID The identifier of the data stream within the property that contains the event edit rule.
Event Edit Rule ID The identifier of the specific event edit rule to be deleted.
Query Parameters Optional additional parameters to customize the request (e.g., filters, pagination).

Output

The output of this node is a JSON array containing the response from the Google Analytics API after attempting to delete the specified event edit rule. Typically, for a delete operation, the API returns an empty object or confirmation of deletion.

The json output field will contain the parsed JSON response from the API call, which confirms the success or failure of the deletion.

No binary data output is involved in this operation.

Dependencies

  • Requires valid Google Analytics API credentials with OAuth2 authentication.
  • The node uses the Google Analytics Admin API endpoint:
    https://analyticsadmin.googleapis.com/v1alpha
  • Proper configuration of OAuth2 credentials in n8n is necessary to authenticate requests.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing credentials, ensure that the Google Analytics OAuth2 API credentials are correctly set up and connected in n8n.
  • Required Parameter Errors: The node requires Property ID, Data Stream ID, and Event Edit Rule ID. Omitting any of these will cause an error indicating the missing parameter.
  • API Errors: Errors returned by the Google Analytics API (e.g., permission denied, not found) will be surfaced with messages prefixed by "Error calling Google Analytics API". Check that the IDs provided are correct and that the authenticated user has sufficient permissions.
  • Network Issues: Ensure that the n8n instance can reach the Google Analytics API endpoints without network restrictions.

Links and References

Discussion