Versions

For a list of methods for this resource, see the end of this page.

Resource representations

Represents a Google Tag Manager Container Version.

{
  "path": string,
  "accountId": string,
  "containerId": string,
  "containerVersionId": string,
  "name": string,
  "deleted": boolean,
  "description": string,
  "container": accounts.containers Resource,
  "tag": [
    accounts.containers.workspaces.tags Resource
  ],
  "trigger": [
    accounts.containers.workspaces.triggers Resource
  ],
  "variable": [
    accounts.containers.workspaces.variables Resource
  ],
  "folder": [
    accounts.containers.workspaces.folders Resource
  ],
  "builtInVariable": [
    {
      "path": string,
      "accountId": string,
      "containerId": string,
      "workspaceId": string,
      "type": string,
      "name": string
    }
  ],
  "fingerprint": string,
  "tagManagerUrl": string,
  "zone": [
    {
      "path": string,
      "accountId": string,
      "containerId": string,
      "workspaceId": string,
      "zoneId": string,
      "name": string,
      "fingerprint": string,
      "tagManagerUrl": string,
      "notes": string,
      "childContainer": [
        {
          "publicId": string,
          "nickname": string
        }
      ],
      "boundary": {
        "condition": [
          {
            "type": string,
            "parameter": [
              {
                "type": string,
                "key": string,
                "value": string,
                "list": [
                  (Parameter)
                ],
                "map": [
                  (Parameter)
                ]
              }
            ]
          }
        ],
        "customEvaluationTriggerId": [
          string
        ]
      },
      "typeRestriction": {
        "enable": boolean,
        "whitelistedTypeId": [
          string
        ]
      }
    }
  ]
}
Property name Value Description Notes
accountId string GTM Account ID.
builtInVariable[] list The built-in variables in the container that this version was taken from.
builtInVariable[].accountId string GTM Account ID.
builtInVariable[].containerId string GTM Container ID.
builtInVariable[].name string Name of the built-in variable to be used to refer to the built-in variable.
builtInVariable[].path string GTM BuiltInVariable's API relative path.
builtInVariable[].type string Type of built-in variable.

Acceptable values are:
  • "advertiserId"
  • "advertisingTrackingEnabled"
  • "ampBrowserLanguage"
  • "ampCanonicalHost"
  • "ampCanonicalPath"
  • "ampCanonicalUrl"
  • "ampClientId"
  • "ampClientMaxScrollX"
  • "ampClientMaxScrollY"
  • "ampClientScreenHeight"
  • "ampClientScreenWidth"
  • "ampClientScrollX"
  • "ampClientScrollY"
  • "ampClientTimestamp"
  • "ampClientTimezone"
  • "ampGtmEvent"
  • "ampPageDownloadTime"
  • "ampPageLoadTime"
  • "ampPageViewId"
  • "ampReferrer"
  • "ampTitle"
  • "ampTotalEngagedTime"
  • "appId"
  • "appName"
  • "appVersionCode"
  • "appVersionName"
  • "builtInVariableTypeUnspecified"
  • "clickClasses"
  • "clickElement"
  • "clickId"
  • "clickTarget"
  • "clickText"
  • "clickUrl"
  • "containerId"
  • "containerVersion"
  • "debugMode"
  • "deviceName"
  • "elementVisibilityFirstTime"
  • "elementVisibilityRatio"
  • "elementVisibilityRecentTime"
  • "elementVisibilityTime"
  • "environmentName"
  • "errorLine"
  • "errorMessage"
  • "errorUrl"
  • "event"
  • "eventName"
  • "firebaseEventParameterCampaign"
  • "firebaseEventParameterCampaignAclid"
  • "firebaseEventParameterCampaignAnid"
  • "firebaseEventParameterCampaignClickTimestamp"
  • "firebaseEventParameterCampaignContent"
  • "firebaseEventParameterCampaignCp1"
  • "firebaseEventParameterCampaignGclid"
  • "firebaseEventParameterCampaignSource"
  • "firebaseEventParameterCampaignTerm"
  • "firebaseEventParameterCurrency"
  • "firebaseEventParameterDynamicLinkAcceptTime"
  • "firebaseEventParameterDynamicLinkLinkid"
  • "firebaseEventParameterNotificationMessageDeviceTime"
  • "firebaseEventParameterNotificationMessageId"
  • "firebaseEventParameterNotificationMessageName"
  • "firebaseEventParameterNotificationMessageTime"
  • "firebaseEventParameterNotificationTopic"
  • "firebaseEventParameterPreviousAppVersion"
  • "firebaseEventParameterPreviousOsVersion"
  • "firebaseEventParameterPrice"
  • "firebaseEventParameterProductId"
  • "firebaseEventParameterQuantity"
  • "firebaseEventParameterValue"
  • "formClasses"
  • "formElement"
  • "formId"
  • "formTarget"
  • "formText"
  • "formUrl"
  • "historySource"
  • "htmlId"
  • "language"
  • "newHistoryFragment"
  • "newHistoryState"
  • "oldHistoryFragment"
  • "oldHistoryState"
  • "osVersion"
  • "pageHostname"
  • "pagePath"
  • "pageUrl"
  • "platform"
  • "randomNumber"
  • "referrer"
  • "resolution"
  • "scrollDepthDirection"
  • "scrollDepthThreshold"
  • "scrollDepthUnits"
  • "sdkVersion"
  • "videoCurrentTime"
  • "videoDuration"
  • "videoPercent"
  • "videoProvider"
  • "videoStatus"
  • "videoTitle"
  • "videoUrl"
  • "videoVisible"
builtInVariable[].workspaceId string GTM Workspace ID.
container nested object The container that this version was taken from.
containerId string GTM Container ID.
containerVersionId string The Container Version ID uniquely identifies the GTM Container Version.
deleted boolean A value of true indicates this container version has been deleted.
description string Container version description. writable
fingerprint string The fingerprint of the GTM Container Version as computed at storage time. This value is recomputed whenever the container version is modified.
folder[] list The folders in the container that this version was taken from.
name string Container version display name. writable
path string GTM ContainerVersions's API relative path.
tagManagerUrl string Auto generated link to the tag manager UI
tag[] list The tags in the container that this version was taken from.
trigger[] list The triggers in the container that this version was taken from.
variable[] list The variables in the container that this version was taken from.
zone[] list The zones in the container that this version was taken from.
zone[].accountId string GTM Account ID.
zone[].boundary nested object This Zone's boundary.
zone[].boundary.condition[] list The conditions that, when conjoined, make up the boundary.
zone[].boundary.condition[].parameter[] list A list of named parameters (key/value), depending on the condition's type. Notes:
  • For binary operators, include parameters named arg0 and arg1 for specifying the left and right operands, respectively.
  • At this time, the left operand (arg0) must be a reference to a variable.
  • For case-insensitive Regex matching, include a boolean parameter named ignore_case that is set to true. If not specified or set to any other value, the matching will be case sensitive.
  • To negate an operator, include a boolean parameter named negate boolean parameter that is set to true.
writable
zone[].boundary.condition[].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
zone[].boundary.condition[].parameter[].list[] list This list parameter's parameters (keys will be ignored). writable
zone[].boundary.condition[].parameter[].map[] list This map parameter's parameters (must have keys; keys must be unique). writable
zone[].boundary.condition[].parameter[].type string The parameter type. Valid values are:
  • boolean: The value represents a boolean, represented as 'true' or 'false'
  • integer: The value represents a 64-bit signed integer value, in base 10
  • list: A list of parameters should be specified
  • map: A map of parameters should be specified
  • template: The value represents any text; this can include variable references (even variable references that might return non-string types)


Acceptable values are:
  • "boolean"
  • "integer"
  • "list"
  • "map"
  • "template"
  • "typeUnspecified"
writable
zone[].boundary.condition[].parameter[].value string A parameter's value (may contain variable references such as "{{myVariable}}") as appropriate to the specified type. writable
zone[].boundary.condition[].type string The type of operator for this condition.

Acceptable values are:
  • "conditionTypeUnspecified"
  • "contains"
  • "cssSelector"
  • "endsWith"
  • "equals"
  • "greater"
  • "greaterOrEquals"
  • "less"
  • "lessOrEquals"
  • "matchRegex"
  • "startsWith"
  • "urlMatches"
writable
zone[].boundary.customEvaluationTriggerId[] list Custom evaluation trigger IDs. A zone will evaluate its boundary conditions when any of the listed triggers are true.
zone[].childContainer[] list Containers that are children of this Zone.
zone[].childContainer[].nickname string The zone's nickname for the child container.
zone[].childContainer[].publicId string The child container's public id.
zone[].containerId string GTM Container ID.
zone[].fingerprint string The fingerprint of the GTM Zone as computed at storage time. This value is recomputed whenever the zone is modified.
zone[].name string Zone display name.
zone[].notes string User notes on how to apply this zone in the container.
zone[].path string GTM Zone's API relative path.
zone[].tagManagerUrl string Auto generated link to the tag manager UI
zone[].typeRestriction nested object This Zone's type restrictions.
zone[].typeRestriction.enable boolean True if type restrictions have been enabled for this Zone.
zone[].typeRestriction.whitelistedTypeId[] list List of type public ids that have been whitelisted for use in this Zone.
zone[].workspaceId string GTM Workspace ID.
zone[].zoneId string The Zone ID uniquely identifies the GTM Zone.

Methods

delete
Deletes a Container Version.
get
Gets a Container Version.
live
Gets the live (i.e. published) container version
publish
Publishes a Container Version.
set_latest
Sets the latest version used for synchronization of workspaces when detecting conflicts and errors.
undelete
Undeletes a Container Version.
update
Updates a Container Version.