Actions102
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
- Folder Actions
- Google Tag Configuration Actions
- Tag Actions
- Template Actions
- Transformation Actions
- Trigger Actions
- User Permission Actions
- Variable Actions
- Version Actions
- Workspace Actions
- Zone Actions
Overview
The "Revert Tags" operation in the Google Tag Manager (GTM) node allows users to revert changes made to a specific GTM Tag within a workspace. This is useful when you want to discard recent modifications and restore the tag to its previous state as stored in the GTM workspace.
Common scenarios include:
- Undoing accidental or unwanted changes to a tag during workspace editing.
- Quickly restoring a tag to a known good configuration without manually editing it.
- Managing tag versions during collaborative workspace development.
For example, if a user modifies a tag's settings but decides not to keep those changes, they can use this operation to revert the tag back to its last saved state in the workspace.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the tag resides. |
| Container ID | The GTM Container ID that contains the workspace and tag. |
| Workspace ID | The GTM Workspace ID where the tag changes were made. |
| Tag ID | The specific GTM Tag ID to revert. |
| Optional Query Parameters | Additional optional parameters for the API call. For this operation, typically empty or unused. |
Output
The output of the "Revert Tags" operation is a JSON object representing the reverted GTM Tag resource. It reflects the tag's state after reverting changes, effectively restoring it to the last saved version in the workspace.
The structure includes all standard properties of a GTM Tag such as its name, type, parameters, firing triggers, and other configuration details as defined by the GTM API.
No binary data is involved in this operation.
Dependencies
- Requires an active Google Tag Manager API OAuth2 credential configured in n8n.
- The node makes authenticated HTTP requests to the Google Tag Manager API endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account, container, and workspace are necessary to perform revert operations.
Troubleshooting
- Missing Required IDs: If any of the required IDs (Account ID, Container ID, Workspace ID, Tag ID) are missing, the node will throw an error indicating which ID is required. Ensure all these fields are correctly filled.
- Authentication Errors: If the OAuth2 credentials are missing or invalid, the node will fail with an authentication error. Verify that the Google Tag Manager API credentials are properly set up.
- Permission Denied: Insufficient permissions on the GTM account or workspace may cause errors. Confirm that the authenticated user has edit access to the specified workspace.
- Tag Not Found: If the Tag ID does not exist in the specified workspace, the API will return an error. Double-check the Tag ID.
- API Rate Limits: Excessive calls might lead to rate limiting by Google API. Implement retries or reduce request frequency if needed.
Links and References
- Google Tag Manager API Documentation - Tags
- Google Tag Manager API Overview
- Google OAuth2 Setup for APIs
This summary focuses specifically on the "Revert Tags" operation of the "Tag" resource as requested.