Google Analytics icon

Google Analytics

Use the Google Analytics API

Actions236

Admin (V1Beta) - Measurement Protocol Secret → Create Measurement Protocol Secret

AI-generated

Overview

This node interacts with the Google Analytics API, specifically supporting a wide range of administrative and data operations across different versions (v1alpha, v1beta) and data APIs. For the selected resource "Admin (V1Beta) - Measurement Protocol Secret" and operation "Create Measurement Protocol Secret," the node creates a new measurement protocol secret within a specified data stream of a Google Analytics property.

This functionality is useful for users who want to programmatically manage measurement protocol secrets, which are used to authenticate requests sent to Google Analytics via the Measurement Protocol. For example, creating a new secret allows secure tracking of events from external sources or servers.

Properties

Name Meaning
Property ID The identifier of the Google Analytics property where the measurement protocol secret will be created.
Data Stream ID The identifier of the data stream within the property where the secret will be created.
Query Parameters Optional additional parameters for the API request (not typically required for creation).
Request Body JSON object containing the details of the measurement protocol secret to create.

The Request Body should contain the necessary fields as defined by the Google Analytics API for creating a measurement protocol secret. This typically includes attributes like display name or other metadata relevant to the secret.

Output

The output is a JSON array where each element corresponds to the response from the Google Analytics API for the executed operation. For the "Create Measurement Protocol Secret" operation, the output JSON contains the newly created measurement protocol secret's details, such as its unique ID, display name, and secret value.

No binary data output is involved in this operation.

Dependencies

  • Requires an OAuth2 credential configured for Google Analytics API access.
  • The node uses the Google Analytics Admin API endpoint https://analyticsadmin.googleapis.com/v1beta.
  • Proper permissions on the Google Analytics account and property are necessary to create measurement protocol secrets.

Troubleshooting

  • Missing Credentials Error: If the node throws an error about missing credentials, ensure that a valid Google Analytics OAuth2 credential is configured and connected.
  • Required Parameter Errors: The node validates presence of required IDs such as Property ID and Data Stream ID. Missing these will cause errors; verify these inputs are correctly set.
  • API Permission Errors: Insufficient permissions on the Google Analytics account or property may result in authorization errors. Confirm the OAuth2 token has the necessary scopes.
  • Malformed Request Body: Ensure the JSON in the Request Body is well-formed and matches the expected schema for creating a measurement protocol secret.
  • Network or API Errors: General API call failures will include error messages from Google Analytics API. Review the message and stack trace for details.

Links and References

Discussion