REST Resource: accounts.containers.environments

资源:环境

表示 Google 跟踪代码管理器环境。请注意,用户可以创建、删除和更新类型为 USER 的环境,但只能更新其他类型环境的 enableDebug 和 url 字段。

JSON 表示法
{
  "accountId": string,
  "containerId": string,
  "environmentId": string,
  "type": enum (EnvironmentType),
  "fingerprint": string,
  "name": string,
  "description": string,
  "enableDebug": boolean,
  "url": string,
  "authorizationCode": string,
  "authorizationTimestampMs": string,

  // Union field Link can be only one of the following:
  "containerVersionId": string
  // End of list of possible types for union field Link.
}
字段
accountId

string

GTM 账号 ID。

containerId

string

GTM 容器 ID。

environmentId

string

唯一标识 GTM 环境的 GTM 环境 ID。

type

enum (EnvironmentType)

此环境的类型。

fingerprint

string

GTM 环境的指纹,以存储时计算的值为准。每当修改环境时,都会重新计算此值。

name

string

环境显示名。只能在类型为 USER 的环境中设置或更改。

description

string

环境说明。只能在类型为 USER 的环境中设置或更改。

enableDebug

boolean

是否默认为环境启用调试。

url

string

环境的默认预览页网址。

authorizationCode

string

环境授权代码。

authorizationTimestampMs

string (int64 format)

授权代码的上次更新时间戳。

containerVersionId

string

EnvironmentType

枚举
user 用于用户定义的环境。
live 用于“已发布”环境,指向已发布的实际容器版本。
latest 用于“最新”环境,指向最近创建的容器版本。
draft 用于草稿环境,指向容器中的单个草稿。

方法

create

创建 GTM 环境。

delete

删除 GTM 环境。

get

获取 GTM 环境。

list

列出 GTM 容器的所有 GTM 环境。

update

更新 GTM 环境。