Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions84

Overview

This node interacts with the Google Analytics API, specifically supporting a wide range of administrative and data management operations. The "Admin (V1Alpha) - Audience" resource's "Archive Audience" operation allows users to archive an audience within a specified Google Analytics property. Archiving an audience effectively deactivates it without deleting its historical data.

Common scenarios for this node include managing audiences in Google Analytics properties, such as archiving outdated or unused audiences to keep the account organized. For example, a marketing team might archive an audience segment that is no longer relevant to ongoing campaigns.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property where the audience exists.
Audience ID The identifier of the specific audience to be archived.
Query Parameters Optional parameters to customize the request, including filters, pagination, and others.

The Query Parameters collection supports these options (not all are relevant for archive operation but available generally):

  • Calculated Metric ID
  • Entity (property or account level)
  • Filter expression
  • Names of access bindings
  • Page Size (number of results)
  • Page Token (for pagination)
  • Show Deleted (include soft-deleted items)
  • Universal Analytics Property ID
  • Update Mask (fields to update)

Output

The output is a JSON array containing the response from the Google Analytics API after attempting to archive the specified audience. Since archiving typically does not return detailed content, the output will confirm success or provide error details if the operation failed.

No binary data output is involved.

Dependencies

  • Requires valid Google Analytics API OAuth2 credentials configured in n8n.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1alpha.
  • Proper permissions on the Google Analytics property to archive audiences are necessary.

Troubleshooting

  • Missing Credentials Error: If the node throws "Missing Google Analytics API Credentials," ensure that OAuth2 credentials for Google Analytics API are properly set up in n8n.
  • Required Parameter Errors: Errors like "Property ID is required" or "Audience ID is required" indicate missing mandatory inputs. Verify that these fields are correctly filled.
  • API Request Failures: Network issues or insufficient permissions can cause API call failures. Check API access rights and network connectivity.
  • Invalid Audience or Property IDs: Using incorrect or non-existent IDs will result in errors. Confirm IDs are accurate and exist in your Google Analytics account.

Links and References


This summary focuses on the "Admin (V1Alpha) - Audience" resource and the "Archive Audience" operation as requested.

Discussion