Actions84
- 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
Overview
The "Set Latest Version" operation in the Google Tag Manager (GTM) node allows users to set a specific container version as the latest version. This is useful for synchronizing workspaces and managing which container version is considered the base or current version for further development or deployment.
Typical use cases include:
- Marking a newly created or updated container version as the latest to ensure all workspace changes are based on it.
- Managing version control within GTM by programmatically setting the latest version after publishing or testing.
- Automating workflows that require updating the synchronization point of GTM containers.
For example, after creating a new container version via the API, you can use this operation to set that version as the latest, so subsequent workspace syncs reference it.
Properties
| Name | Meaning |
|---|---|
| Account ID | The unique identifier of the GTM Account where the container resides. |
| Container ID | The unique identifier of the GTM Container for which the version will be set as latest. |
| Version ID | The identifier of the GTM Container Version to set as the latest version. |
| Optional Query Parameters | Additional optional parameters to customize the request; not typically required for this operation. |
Output
The output JSON contains the response from the GTM API after setting the specified container version as the latest. This typically includes details about the container version resource that was updated, such as its ID, name, description, and status.
The structure corresponds to the GTM Container Version resource, which may include fields like:
containerVersionId: The ID of the container version.name: The name of the version.description: Description of the version.fingerprint: A fingerprint used for concurrency control.- Other metadata related to the container version.
No binary data is output by this operation.
Dependencies
- Requires an active connection with valid Google Tag Manager API credentials (OAuth2 token).
- The node uses the Google Tag Manager API v2 endpoint:
https://www.googleapis.com/tagmanager/v2. - Proper permissions on the GTM account and container to modify versions.
Troubleshooting
- Missing Required IDs: Errors will occur if Account ID, Container ID, or Version ID are not provided. Ensure these are correctly set.
- Authentication Errors: If the OAuth2 credentials are missing or invalid, the node will throw an authentication error. Verify the API credentials and re-authenticate if necessary.
- Permission Denied: Insufficient permissions on the GTM account/container can cause failures. Confirm the user has appropriate access rights.
- Version Not Found: Providing an incorrect or non-existent Version ID will result in an error. Double-check the version ID.
- API Rate Limits: Exceeding Google API quotas may cause errors. Implement retries or backoff strategies if needed.
Error messages returned by the node will include the prefix "Error calling GTM API:" followed by the detailed message from the API.