這個 API 可讓用戶端存取及修改容器和代碼設定。
- REST 資源:v2.accounts
- REST 資源:v2.accounts.containers
- REST 資源:v2.accounts.containers.destinations
- REST 資源:v2.accounts.containers.environments
- REST 資源:v2.accounts.containers.version_headers
- REST 資源:v2.accounts.containers.versions
- REST 資源:v2.accounts.containers.workspaces
- REST 資源:v2.accounts.containers.workspaces.built_in_variables
- REST 資源:v2.accounts.containers.workspaces.clients
- REST 資源:v2.accounts.containers.workspaces.folders
- REST 資源:v2.accounts.containers.workspaces.gtag_config
- REST 資源:v2.accounts.containers.workspaces.tags
- REST 資源:v2.accounts.containers.workspaces.templates
- REST 資源:v2.accounts.containers.workspaces.transformations
- REST 資源:v2.accounts.containers.workspaces.triggers
- REST 資源:v2.accounts.containers.workspaces.variables
- REST 資源:v2.accounts.containers.workspaces.zones
- REST 資源:v2.accounts.user_permissions
- REST 資源:v1.accounts
- REST 資源:v1.accounts.containers
- REST 資源:v1.accounts.containers.environments
- REST 資源:v1.accounts.containers.folders
- REST 資源:v1.accounts.containers.folders.entities
- REST 資源:v1.accounts.containers.move_folders
- REST 資源:v1.accounts.containers.reauthorize_environments
- REST 資源:v1.accounts.containers.tags
- REST 資源:v1.accounts.containers.triggers
- REST 資源:v1.accounts.containers.variables
- REST 資源:v1.accounts.containers.versions
- REST 資源:v1.accounts.permissions
服務:tagmanager.googleapis.com
如要呼叫這項服務,建議您使用 Google 提供的用戶端程式庫。如果您的應用程式需要使用您自己的程式庫來呼叫這項服務,請在發出 API 要求時使用下列資訊。
探索文件
探索文件是一種機器可解讀的規格,用於說明和使用 REST API。此文件用於建構用戶端程式庫、IDE 外掛程式,以及與 Google API 互動的其他工具。一項服務可能會提供多個探索文件。此服務提供下列探索文件:
服務端點
服務端點是指定 API 服務網路位址的基準網址。一項服務可能有多個服務端點。這項服務有以下服務端點,且下方的 URI 皆以此服務端點為基準:
https://tagmanager.googleapis.com
REST 資源:v2.accounts
方法 | |
---|---|
get |
GET /tagmanager/v2/{path} 取得 GTM 帳戶。 |
list |
GET /tagmanager/v2/accounts 列出使用者可存取的所有 GTM 帳戶。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 帳戶。 |
REST 資源:v2.accounts.containers
方法 | |
---|---|
combine |
POST /tagmanager/v2/{path}:combine 結合容器。 |
create |
POST /tagmanager/v2/{parent}/containers 建立容器。 |
delete |
DELETE /tagmanager/v2/{path} 刪除容器。 |
get |
GET /tagmanager/v2/{path} 取得容器。 |
list |
GET /tagmanager/v2/{parent}/containers 列出屬於 GTM 帳戶的所有容器。 |
lookup |
GET /tagmanager/v2/accounts/containers:lookup 依到達網頁 ID 或代碼 ID 查詢容器。 |
move_tag_id |
POST /tagmanager/v2/{path}:move_tag_id 將代碼 ID 從容器中移出。 |
snippet |
GET /tagmanager/v2/{path}:snippet 取得容器的標記片段。 |
update |
PUT /tagmanager/v2/{path} 更新容器。 |
REST 資源:v2.accounts.containers.destinations
方法 | |
---|---|
get |
GET /tagmanager/v2/{path} 取得目的地。 |
link |
POST /tagmanager/v2/{parent}/destinations:link 將目的地新增至這個容器,並從目前連結的容器中移除。 |
list |
GET /tagmanager/v2/{parent}/destinations 列出連結至 GTM 容器的所有目的地。 |
REST 資源:v2.accounts.containers.environments
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/environments 建立 GTM 環境。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 環境。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 環境。 |
list |
GET /tagmanager/v2/{parent}/environments 列出 GTM 容器的所有 GTM 環境。 |
reauthorize |
POST /tagmanager/v2/{path}:reauthorize 重新產生 GTM 環境的授權碼。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 環境。 |
REST 資源:v2.accounts.containers.version_headers
方法 | |
---|---|
latest |
GET /tagmanager/v2/{parent}/version_headers:latest 取得最新的容器版本標頭 |
list |
GET /tagmanager/v2/{parent}/version_headers 列出 GTM 容器的所有容器版本。 |
REST 資源:v2.accounts.containers.versions
方法 | |
---|---|
delete |
DELETE /tagmanager/v2/{path} 刪除容器版本。 |
get |
GET /tagmanager/v2/{path} 取得容器版本。 |
live |
GET /tagmanager/v2/{parent}/versions:live 取得即時 (即 |
publish |
POST /tagmanager/v2/{path}:publish 發布容器版本。 |
set_latest |
POST /tagmanager/v2/{path}:set_latest 設定偵測衝突和錯誤時,用於同步處理工作區的最新版本。 |
undelete |
POST /tagmanager/v2/{path}:undelete 取消刪除容器版本。 |
update |
PUT /tagmanager/v2/{path} 更新容器版本。 |
REST 資源:v2.accounts.containers.workspaces
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/workspaces 建立工作區。 |
create_version |
POST /tagmanager/v2/{path}:create_version 根據工作區中的實體建立容器版本、刪除工作區,並將基礎容器版本設為新建立的版本。 |
delete |
DELETE /tagmanager/v2/{path} 刪除工作區。 |
get |
GET /tagmanager/v2/{path} 取得工作區。 |
getStatus |
GET /tagmanager/v2/{path}/status 找出工作區中發生衝突和修改的實體。 |
list |
GET /tagmanager/v2/{parent}/workspaces 列出屬於 GTM 容器的所有工作區。 |
quick_preview |
POST /tagmanager/v2/{path}:quick_preview 根據提供的工作區中的所有實體,建立假的容器版本,快速預覽工作區。 |
resolve_conflict |
POST /tagmanager/v2/{path}:resolve_conflict 解決工作區實體的合併衝突,方法是將實體更新為要求中傳遞的已解決實體。 |
sync |
POST /tagmanager/v2/{path}:sync 透過更新所有未修改的工作區實體,並顯示已修改實體的衝突,將工作區同步至最新的容器版本。 |
update |
PUT /tagmanager/v2/{path} 更新工作區。 |
REST 資源:v2.accounts.containers.workspaces.built_in_variables
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/built_in_variables 建立一或多個 GTM 內建變數。 |
delete |
DELETE /tagmanager/v2/{path} 刪除一或多個 GTM 內建變數。 |
list |
GET /tagmanager/v2/{parent}/built_in_variables 列出 GTM 容器中所有已啟用的內建變數。 |
revert |
POST /tagmanager/v2/{path}/built_in_variables:revert 還原 GTM 工作區中 GTM 內建變數的變更。 |
REST 資源:v2.accounts.containers.workspaces.clients
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/clients 建立 GTM 用戶端。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 用戶端。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 用戶端。 |
list |
GET /tagmanager/v2/{parent}/clients 列出 GTM 容器工作區的所有 GTM 用戶端。 |
revert |
POST /tagmanager/v2/{path}:revert 將 GTM 工作室中的 GTM 用戶端變更還原。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 用戶端。 |
REST 資源:v2.accounts.containers.workspaces.folders
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/folders 建立 GTM 資料夾。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 資料夾。 |
entities |
POST /tagmanager/v2/{path}:entities 列出 GTM 資料夾中的所有實體。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 資料夾。 |
list |
GET /tagmanager/v2/{parent}/folders 列出容器的所有 GTM 資料夾。 |
move_entities_to_folder |
POST /tagmanager/v2/{path}:move_entities_to_folder 將實體移至 GTM 資料夾。 |
revert |
POST /tagmanager/v2/{path}:revert 還原 GTM 工作區中 GTM 資料夾的變更。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 資料夾。 |
REST 資源:v2.accounts.containers.workspaces.gtag_config
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/gtag_config 建立 Google 代碼設定。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 Google 代碼設定。 |
get |
GET /tagmanager/v2/{path} 取得 Google 代碼設定。 |
list |
GET /tagmanager/v2/{parent}/gtag_config 列出容器中的所有 Google 代碼設定。 |
update |
PUT /tagmanager/v2/{path} 更新 Google 代碼設定。 |
REST 資源:v2.accounts.containers.workspaces.templates
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/templates 建立 GTM 自訂範本。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 範本。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 範本。 |
import_from_gallery |
POST /tagmanager/v2/{parent}/templates:import_from_gallery 從相片庫匯入 GTM 自訂範本。 |
list |
GET /tagmanager/v2/{parent}/templates 列出 GTM 容器工作區的所有 GTM 範本。 |
revert |
POST /tagmanager/v2/{path}:revert 還原 GTM 工作區中 GTM 範本的變更。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 範本。 |
REST 資源:v2.accounts.containers.workspaces.transformations
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/transformations 建立 GTM 轉換。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 轉換。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 轉換。 |
list |
GET /tagmanager/v2/{parent}/transformations 列出 GTM 容器工作區的所有 GTM 轉換。 |
revert |
POST /tagmanager/v2/{path}:revert 還原 GTM 工作區中的 GTM 轉換。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 轉換。 |
REST 資源:v2.accounts.containers.workspaces.triggers
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/triggers 建立 GTM 觸發條件。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 觸發條件。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 觸發條件。 |
list |
GET /tagmanager/v2/{parent}/triggers 列出容器的所有 GTM 觸發條件。 |
revert |
POST /tagmanager/v2/{path}:revert 還原 GTM 工作區中 GTM 觸發條件中的變更。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 觸發條件。 |
REST 資源:v2.accounts.containers.workspaces.variables
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/variables 建立 GTM 變數。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 變數。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 變數。 |
list |
GET /tagmanager/v2/{parent}/variables 列出容器的所有 GTM 變數。 |
revert |
POST /tagmanager/v2/{path}:revert 還原 GTM 工作區中 GTM 變數的變更。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 變數。 |
REST 資源:v2.accounts.containers.workspaces.zones
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/zones 建立 GTM 可用區。 |
delete |
DELETE /tagmanager/v2/{path} 刪除 GTM 可用區。 |
get |
GET /tagmanager/v2/{path} 取得 GTM 區域。 |
list |
GET /tagmanager/v2/{parent}/zones 列出 GTM 容器工作區的所有 GTM 區域。 |
revert |
POST /tagmanager/v2/{path}:revert 將 GTM 工作區中的 GTM 區域還原為先前的狀態。 |
update |
PUT /tagmanager/v2/{path} 更新 GTM 區域。 |
REST 資源:v2.accounts.user_permissions
方法 | |
---|---|
create |
POST /tagmanager/v2/{parent}/user_permissions 建立使用者的帳戶和容器存取權。 |
delete |
DELETE /tagmanager/v2/{path} 將使用者從帳戶中移除,並撤銷對帳戶和所有容器的存取權。 |
get |
GET /tagmanager/v2/{path} 取得使用者的帳戶和容器存取權。 |
list |
GET /tagmanager/v2/{parent}/user_permissions 列出所有可存取帳戶的使用者,以及授予每位使用者的帳戶和容器使用者存取權。 |
update |
PUT /tagmanager/v2/{path} 更新使用者的帳戶和容器存取權。 |
REST 資源:v1.accounts
方法 | |
---|---|
get |
GET /tagmanager/v1/accounts/{accountId} 取得 GTM 帳戶。 |
list |
GET /tagmanager/v1/accounts 列出使用者可存取的所有 GTM 帳戶。 |
update |
PUT /tagmanager/v1/accounts/{accountId} 更新 GTM 帳戶。 |
REST 資源:v1.accounts.containers
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/containers 建立容器。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId} 刪除容器。 |
get |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId} 取得容器。 |
list |
GET /tagmanager/v1/accounts/{accountId}/containers 列出屬於 GTM 帳戶的所有容器。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId} 更新容器。 |
REST 資源:v1.accounts.containers.environments
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments 建立 GTM 環境。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId} 刪除 GTM 環境。 |
get |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId} 取得 GTM 環境。 |
list |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments 列出 GTM 容器的所有 GTM 環境。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId} 更新 GTM 環境。 |
REST 資源:v1.accounts.containers.folders
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders 建立 GTM 資料夾。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId} 刪除 GTM 資料夾。 |
get |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId} 取得 GTM 資料夾。 |
list |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders 列出容器的所有 GTM 資料夾。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId} 更新 GTM 資料夾。 |
REST 資源:v1.accounts.containers.folders.entities
方法 | |
---|---|
list |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities 列出 GTM 資料夾中的所有實體。 |
REST 資源:v1.accounts.containers.move_folders
方法 | |
---|---|
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId} 將實體移至 GTM 資料夾。 |
REST 資源:v1.accounts.containers.triggers
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers 建立 GTM 觸發條件。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId} 刪除 GTM 觸發條件。 |
get |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId} 取得 GTM 觸發條件。 |
list |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers 列出容器的所有 GTM 觸發條件。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId} 更新 GTM 觸發條件。 |
REST 資源:v1.accounts.containers.variables
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables 建立 GTM 變數。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId} 刪除 GTM 變數。 |
get |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId} 取得 GTM 變數。 |
list |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables 列出容器的所有 GTM 變數。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId} 更新 GTM 變數。 |
REST 資源:v1.accounts.containers.versions
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions 建立容器版本。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId} 刪除容器版本。 |
get |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId} 取得容器版本。 |
list |
GET /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions 列出 GTM 容器的所有容器版本。 |
publish |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish 發布容器版本。 |
restore |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore 還原容器版本。 |
undelete |
POST /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete 取消刪除容器版本。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId} 更新容器版本。 |
REST 資源:v1.accounts.permissions
方法 | |
---|---|
create |
POST /tagmanager/v1/accounts/{accountId}/permissions 建立使用者的帳戶和容器權限。 |
delete |
DELETE /tagmanager/v1/accounts/{accountId}/permissions/{permissionId} 將使用者從帳戶中移除,並撤銷對帳戶和所有容器的存取權。 |
get |
GET /tagmanager/v1/accounts/{accountId}/permissions/{permissionId} 取得使用者的帳戶和容器權限。 |
list |
GET /tagmanager/v1/accounts/{accountId}/permissions 列出所有可存取帳戶的使用者,以及授予每位使用者的帳戶和容器權限。 |
update |
PUT /tagmanager/v1/accounts/{accountId}/permissions/{permissionId} 更新使用者的帳戶和容器權限。 |