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 位元的帶正負號整數值,以 10 為底數
  • 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 如果這個區域已啟用類型限制,則為「是」。
typeRestriction.whitelistedTypeId[] list 列入這個可用區的許可清單類型公開 ID 類型清單。
workspaceId string GTM 工作區 ID。
zoneId string 區域 ID 可用來識別 GTM 區域。

方法

建立
建立 GTM 區域。
刪除
刪除 GTM 區域。
取得
取得 GTM 區域。
list
列出 GTM 容器工作區的所有 GTM 區域。
revert
在 GTM 工作區中還原對 GTM 區域的變更。
更新
更新 GTM 區域。