Actions27
- Account Actions
- Built-In Variable Actions
- Client Actions
- Container Actions
- Destination Actions
- Environment Actions
Environment → Update Environment
AI-generatedOverview
This node operation updates an existing Google Tag Manager (GTM) Environment within a specified GTM Account and Container. It is useful for modifying environment settings such as environment name, URL, or authorization details. For example, a user can update the staging environment configuration to reflect new deployment URLs or credentials.
Use Case Examples
- Update a GTM Environment to change its URL or authorization code.
- Modify environment settings in GTM to reflect changes in deployment stages.
Properties
| Name | Meaning |
|---|---|
| Account ID | The GTM Account ID where the environment exists. |
| Container ID | The GTM Container ID where the environment exists. |
| Environment ID | The specific GTM Environment ID to update. |
| Optional Query Parameters | Additional optional parameters to customize the update operation, such as feature flags or specific update behaviors. |
Output
JSON
environmentId- The ID of the updated GTM Environment.name- The name of the updated environment.url- The URL associated with the updated environment.authorizationCode- The authorization code for the environment, if applicable.fingerprint- The fingerprint of the environment resource after update.
Dependencies
- Google Tag Manager API OAuth2 credentials
Troubleshooting
- Missing required parameters such as Account ID, Container ID, or Environment ID will cause the operation to fail with an error indicating the missing parameter.
- If the provided Environment ID does not exist or is incorrect, the API will return an error indicating the resource was not found.
- Incorrect or missing OAuth2 credentials will result in authentication errors when calling the GTM API.
- Ensure the request body JSON is correctly formatted and contains valid fields for the environment update to avoid API errors.
Links
- Google Tag Manager API - Update Environment - Official documentation for updating an environment in Google Tag Manager via the API.