Google Tag Manager icon

Google Tag Manager

Use the Google Tag Manager API

Actions84

Overview

The "Revert Transformation" operation in the Google Tag Manager (GTM) node allows users to revert changes made to a specific transformation within a GTM workspace. This is useful when you want to discard recent edits or updates to a transformation and restore it to its previous state.

Common scenarios include:

  • Undoing unintended modifications to a transformation.
  • Restoring a transformation to a known good configuration after testing changes.
  • Managing version control within GTM workspaces by reverting individual entities.

For example, if a user has edited a transformation but decides that the changes are incorrect or cause issues, they can use this operation to revert the transformation back to its last saved state.

Properties

Name Meaning
Account ID The unique identifier of the GTM Account where the transformation resides.
Container ID The unique identifier of the GTM Container within the account.
Workspace ID The unique identifier of the GTM Workspace containing the transformation.
Transformation ID The unique identifier of the GTM Transformation to revert.
Optional Query Parameters Additional optional parameters for the API call, such as flags controlling permission updates.

Details on Optional Query Parameters

  • Allow User Permission Feature Update: Boolean flag to allow updating user permissions feature; must be true to enable certain permission changes.
  • Other parameters exist but are generally not relevant for this operation.

Output

The output is a JSON object representing the reverted transformation resource as returned by the GTM API. It contains all details of the transformation after the revert operation, reflecting its restored state.

No binary data output is involved.

Dependencies

  • Requires an active Google Tag Manager API OAuth2 credential configured in n8n.
  • The node makes authenticated HTTP requests to the GTM 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: Errors will occur if any of the required IDs (Account ID, Container ID, Workspace ID, Transformation ID) are not provided. Ensure all these fields are filled correctly.
  • Authentication Errors: If the OAuth2 credentials are missing or invalid, the node will throw an error indicating missing credentials.
  • Permission Denied: Insufficient permissions on the GTM account or workspace may cause API errors. Verify that the authenticated user has appropriate access rights.
  • Invalid Transformation ID: Providing a non-existent or incorrect transformation ID will result in an error from the GTM API.
  • API Rate Limits: Excessive calls might trigger rate limiting; handle retries accordingly.

Links and References


This summary focuses specifically on the "Revert Transformation" operation under the "Transformation" resource as requested.

Discussion