Containers

The containers associated with a Tag Manager account. A container is comprised of a set of macros, rules and tags. For information about how users create and maintain containers, see Setup and Workflow.

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

Resource representations

Represents a Google Tag Manager Container.

{
  "accountId": string,
  "containerId": string,
  "name": string,
  "domainName": [
    string
  ],
  "publicId": string,
  "timeZoneCountryId": string,
  "timeZoneId": string,
  "notes": string,
  "usageContext": [
    string
  ],
  "enabledBuiltInVariable": [
    string
  ],
  "fingerprint": string
}
Property name Value Description Notes
accountId string GTM Account ID.
containerId string The Container ID uniquely identifies the GTM Container.
domainName[] list Optional list of domain names associated with the Container. writable
enabledBuiltInVariable[] list List of enabled built-in variables. Valid values include: pageUrl, pageHostname, pagePath, referrer, event, clickElement, clickClasses, clickId, clickTarget, clickUrl, clickText, formElement, formClasses, formId, formTarget, formUrl, formText, errorMessage, errorUrl, errorLine, newHistoryFragment, oldHistoryFragment, newHistoryState, oldHistoryState, historySource, containerVersion, debugMode, randomNumber, containerId. writable
fingerprint string The fingerprint of the GTM Container as computed at storage time. This value is recomputed whenever the account is modified.
name string Container display name. writable
notes string Container Notes. writable
publicId string Container Public ID.

timeZoneCountryId string Container Country ID. writable
timeZoneId string Container Time Zone ID. writable
usageContext[] list List of Usage Contexts for the Container. Valid values include: web, android, ios. writable

Methods

Use the methods below to create, modify and delete containers.

create
Creates a container.
delete
Deletes a container.
get
Gets a container.
list
Lists all containers that belongs to a GTM account.
update
Updates a container.