Updates a GTM Variable. Try it now.
Request
HTTP request
PUT https://www.googleapis.com/tagmanager/v2/path
Parameters
Parameter name | Value | Description |
---|---|---|
Path parameters | ||
path |
string |
GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id} |
Optional query parameters | ||
fingerprint |
string |
When provided, this fingerprint must match the fingerprint of the variable in storage. |
Authorization
This request requires authorization with the following scope:
Scope |
---|
https://www.googleapis.com/auth/tagmanager.edit.containers |
For more information, see the authentication and authorization page.
Request body
In the request body, supply a Variables resource with the following properties:
Property name | Value | Description | Notes |
---|---|---|---|
Required Properties | |||
formatValue.convertFalseToValue.type |
string |
The parameter type. Valid values are:
Acceptable values are:
|
writable |
formatValue.convertNullToValue.type |
string |
The parameter type. Valid values are:
Acceptable values are:
|
writable |
formatValue.convertTrueToValue.type |
string |
The parameter type. Valid values are:
Acceptable values are:
|
writable |
formatValue.convertUndefinedToValue.type |
string |
The parameter type. Valid values are:
Acceptable values are:
|
writable |
name |
string |
Variable display name. | writable |
parameter[].type |
string |
The parameter type. Valid values are:
Acceptable values are:
|
writable |
type |
string |
GTM Variable Type. | writable |
Optional Properties | |||
disablingTriggerId[] |
list |
For mobile containers only: A list of trigger IDs for disabling conditional variables; the variable is enabled if one of the enabling trigger is true while all the disabling trigger are false. Treated as an unordered set. | writable |
enablingTriggerId[] |
list |
For mobile containers only: A list of trigger IDs for enabling conditional variables; the variable is enabled if one of the enabling triggers is true while all the disabling triggers are false. Treated as an unordered set. | writable |
formatValue.convertFalseToValue.key |
string |
The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. | writable |
formatValue.convertFalseToValue.list[] |
list |
This list parameter's parameters (keys will be ignored). | writable |
formatValue.convertFalseToValue.map[] |
list |
This map parameter's parameters (must have keys; keys must be unique). | writable |
formatValue.convertFalseToValue.value |
string |
A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. | writable |
formatValue.convertNullToValue.key |
string |
The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. | writable |
formatValue.convertNullToValue.list[] |
list |
This list parameter's parameters (keys will be ignored). | writable |
formatValue.convertNullToValue.map[] |
list |
This map parameter's parameters (must have keys; keys must be unique). | writable |
formatValue.convertNullToValue.value |
string |
A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. | writable |
formatValue.convertTrueToValue.key |
string |
The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. | writable |
formatValue.convertTrueToValue.list[] |
list |
This list parameter's parameters (keys will be ignored). | writable |
formatValue.convertTrueToValue.map[] |
list |
This map parameter's parameters (must have keys; keys must be unique). | writable |
formatValue.convertTrueToValue.value |
string |
A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. | writable |
formatValue.convertUndefinedToValue.key |
string |
The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. | writable |
formatValue.convertUndefinedToValue.list[] |
list |
This list parameter's parameters (keys will be ignored). | writable |
formatValue.convertUndefinedToValue.map[] |
list |
This map parameter's parameters (must have keys; keys must be unique). | writable |
formatValue.convertUndefinedToValue.value |
string |
A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. | writable |
notes |
string |
User notes on how to apply this variable in the container. | writable |
parameter[] |
list |
The variable's parameters. | writable |
parameter[].key |
string |
The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. | writable |
parameter[].list[] |
list |
This list parameter's parameters (keys will be ignored). | writable |
parameter[].map[] |
list |
This map parameter's parameters (must have keys; keys must be unique). | writable |
parameter[].value |
string |
A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. | writable |
scheduleEndMs |
long |
The end timestamp in milliseconds to schedule a variable. | writable |
scheduleStartMs |
long |
The start timestamp in milliseconds to schedule a variable. | writable |
Response
If successful, this method returns a Variables resource in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.