Zones

如需了解此资源的方法列表,请参阅本页结尾部分。

资源表示形式

表示 Google 跟踪代码管理器区域的内容。

{
  "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)
            ],
            "isWeakReference": boolean
          }
        ]
      }
    ],
    "customEvaluationTriggerId": [
      string
    ]
  },
  "typeRestriction": {
    "enable": boolean,
    "whitelistedTypeId": [
      string
    ]
  }
}
属性名称 说明 备注
accountId string GTM 账号 ID。
boundary nested object 此区域的边界。
boundary.condition[] list 这些条件组合起来可构成边界。
boundary.condition[].parameter[] list 命名参数(即键值对)的列表,具体取决于条件的类型。注意:
  • 对于二元运算符,请添加名为 arg0arg1 的参数,分别用于指定左右操作数。
  • 此时,左操作数 (arg0) 必须是对变量的引用。
  • 对于不区分大小写的正则表达式匹配,请添加名为 ignore_case 的布尔值参数,该参数设置为 true。如未指定该参数或已将其设置为任何其他值,则匹配将区分大小写。
  • 要使运算符无效,请添加一个名为 negate 布尔值参数(已设置为 true)的布尔值参数。
可写
boundary.condition[].parameter[].isWeakReference boolean 引用类型参数是强引用还是弱引用。仅供转换使用。 可写
boundary.condition[].parameter[].key string 唯一标识参数的命名键。对于顶级参数及映射值,该键属于必需项。但对于列表值,会忽略该键。 可写
boundary.condition[].parameter[].list[] list 该列表参数的参数(键将被忽略)。 可写
boundary.condition[].parameter[].map[] list 该映射参数的参数(必须提供键;且键必须具有唯一性)。 可写
boundary.condition[].parameter[].type string 参数类型。有效值:
  • boolean:该值表示布尔值,以“true”或“false”表示
  • integer:该值表示 64 位的正负十进制整数值
  • list:应指定的参数的列表
  • map:应指定的参数的映射
  • template:该值表示任何文本;可以包括变量引用,甚至是可能返回非字符串类型的变量引用
  • trigger_reference:该值表示触发器,以触发器 ID 表示
  • tag_reference:该值表示代码,以代码名称表示


可接受的值:
  • "boolean"
  • "integer"
  • "list"
  • "map"
  • "tagReference"
  • "template"
  • "triggerReference"
  • "typeUnspecified"
可写
boundary.condition[].parameter[].value string 适用于指定类型的参数的值,可以包含变量引用,如“”。 可写
boundary.condition[].type string 此条件的运算符类型。

可接受的值:
  • "conditionTypeUnspecified"
  • "contains"
  • "cssSelector"
  • "endsWith"
  • "equals"
  • "greater"
  • "greaterOrEquals"
  • "less"
  • "lessOrEquals"
  • "matchRegex"
  • "startsWith"
  • "urlMatches"
可写
boundary.customEvaluationTriggerId[] list 自定义评估触发器 ID。如果列出的任何触发器为 true,区域将评估其边界条件。
childContainer[] list 此区域的子容器。
childContainer[].nickname string 区域中子容器的别名。
childContainer[].publicId string 子容器的公共 ID。
containerId string GTM 容器 ID。
fingerprint string GTM 区域的指纹,以存储时计算的值为准。每当修改区域时,都会重新计算此值。
name string 区域显示名。
notes string 有关如何在容器中应用此区域的用户注释。
path string GTM 区域的 API 相对路径。
tagManagerUrl string 自动生成的指向跟踪代码管理器界面的链接。
typeRestriction nested object 此区域的类型限制。
typeRestriction.enable boolean 如果已为此区域启用类型限制,则为 true。
typeRestriction.whitelistedTypeId[] list 已列入白名单以便在此区域中使用的类型公共 ID 的列表。
workspaceId string GTM 工作区 ID。
zoneId string 唯一标识 GTM 区域的区域 ID。

方法

create
创建 GTM 区域。
delete
删除 GTM 区域。
get
获取 GTM 区域。
list
列出 GTM 容器工作区的所有 GTM 区域。
revert
还原对 GTM 工作区中 GTM 区域的更改。
update
更新 GTM 区域。