REST Resource: accounts.containers.workspaces.variables

Resource: Variable

Represents a Google Tag Manager Variable.

JSON representation
{
  "path": string,
  "accountId": string,
  "containerId": string,
  "workspaceId": string,
  "variableId": string,
  "name": string,
  "type": string,
  "notes": string,
  "scheduleStartMs": string,
  "scheduleEndMs": string,
  "parameter": [
    {
      object (Parameter)
    }
  ],
  "enablingTriggerId": [
    string
  ],
  "disablingTriggerId": [
    string
  ],
  "fingerprint": string,
  "parentFolderId": string,
  "tagManagerUrl": string,
  "formatValue": {
    object (FormatValue)
  }
}
Fields
path

string

GTM Variable's API relative path.

accountId

string

GTM Account ID.

containerId

string

GTM Container ID.

workspaceId

string

GTM Workspace ID.

variableId

string

The Variable ID uniquely identifies the GTM Variable.

name

string

Variable display name.

type

string

GTM Variable Type.

notes

string

User notes on how to apply this variable in the container.

scheduleStartMs

string (int64 format)

The start timestamp in milliseconds to schedule a variable.

scheduleEndMs

string (int64 format)

The end timestamp in milliseconds to schedule a variable.

parameter[]

object (Parameter)

The variable's parameters.

enablingTriggerId[]

string

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.

disablingTriggerId[]

string

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.

fingerprint

string

The fingerprint of the GTM Variable as computed at storage time. This value is recomputed whenever the variable is modified.

parentFolderId

string

Parent folder id.

tagManagerUrl

string

Auto generated link to the tag manager UI

formatValue

object (FormatValue)

Option to convert a variable value to other value.

FormatValue

JSON representation
{
  "caseConversionType": enum (CaseConversionType),
  "convertNullToValue": {
    object (Parameter)
  },
  "convertUndefinedToValue": {
    object (Parameter)
  },
  "convertTrueToValue": {
    object (Parameter)
  },
  "convertFalseToValue": {
    object (Parameter)
  }
}
Fields
caseConversionType

enum (CaseConversionType)

The option to convert a string-type variable value to either lowercase or uppercase.

convertNullToValue

object (Parameter)

The value to convert if a variable value is null.

convertUndefinedToValue

object (Parameter)

The value to convert if a variable value is undefined.

convertTrueToValue

object (Parameter)

The value to convert if a variable value is true.

convertFalseToValue

object (Parameter)

The value to convert if a variable value is false.

CaseConversionType

Enums
none
lowercase The option to convert a variable value to lowercase.
uppercase The option to convert a variable value to uppercase.

Methods

create

Creates a GTM Variable.

delete

Deletes a GTM Variable.

get

Gets a GTM Variable.

list

Lists all GTM Variables of a Container.

revert

Reverts changes to a GTM Variable in a GTM Workspace.

update

Updates a GTM Variable.