Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions102

Overview

The "Revert Zone" operation in the Google Tag Manager (GTM) node allows users to revert changes made to a specific GTM Zone within a workspace. This is useful when you want to discard modifications and restore the zone to its previous state as stored in the GTM system.

Typical scenarios include:

  • Undoing unintended or erroneous edits to a zone configuration.
  • Quickly restoring a zone to a known good state without manually reversing changes.
  • Managing workspace changes safely by reverting zones before publishing.

For example, if you have modified a zone's rules or tags but decide not to keep those changes, using this operation will revert the zone back to its last saved version in the workspace.

Properties

Name Meaning
Account ID The GTM Account ID where the zone resides.
Container ID The GTM Container ID that contains the workspace and zone.
Workspace ID The GTM Workspace ID where the zone exists.
Zone ID The GTM Zone ID identifying the specific zone 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 Zone" operation is a JSON object representing the reverted GTM Zone resource. It reflects the state of the zone after the revert action has been applied, effectively showing the zone restored to its prior saved state.

The structure corresponds to the GTM Zone resource schema from the Google Tag Manager API, including properties such as zone name, description, boundary rules, and tag configurations.

No binary data is involved in this operation.

Dependencies

  • Requires an active and valid OAuth2 credential for Google Tag Manager API access.
  • The node uses 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, Zone ID) are missing, the node will throw an error indicating which ID is required.
  • Authentication Errors: Ensure that the OAuth2 credentials are correctly configured and authorized with sufficient scopes to access and modify GTM resources.
  • API Errors: Errors returned from the GTM API (e.g., permission denied, invalid zone ID) will be surfaced with messages prefixed by "Error calling GTM API".
  • Operation Unknown: If the operation parameter is incorrect or unsupported, the node will throw an "Unknown operation" error.

To resolve errors:

  • Verify all required input fields are provided.
  • Check and refresh OAuth2 credentials if needed.
  • Confirm user permissions in GTM for the specified account/container/workspace.
  • Review the exact error message for API-specific issues.

Links and References


This summary focuses specifically on the "Zone" resource and the "Revert Zone" operation as requested.

Discussion