REST Resource: accounts.containers.workspaces.variables

ทรัพยากร: ตัวแปร

แสดงตัวแปร Google Tag Manager

การแสดง JSON
{
  "path": string,
  "accountId": string,
  "containerId": string,
  "workspaceId": string,
  "variableId": string,
  "name": string,
  "type": string,
  "notes": string,
  "scheduleStartMs": string,
  "scheduleEndMs": string,
  "parameter": [
    {
      object (Parameter)
    }
  ],
  "enablingTriggerId": [
    string
  ],
  "disablingTriggerId": [
    string
  ],
  "fingerprint": string,
  "parentFolderId": string,
  "tagManagerUrl": string,
  "formatValue": {
    object (FormatValue)
  }
}
ช่อง
path

string

เส้นทางสัมพัทธ์ของ API ของตัวแปร GTM

accountId

string

รหัสบัญชี GTM

containerId

string

รหัสคอนเทนเนอร์ GTM

workspaceId

string

รหัสพื้นที่ทำงาน GTM

variableId

string

รหัสตัวแปรจะระบุตัวแปร GTM ได้อย่างไม่ซ้ำกัน

name

string

ชื่อที่แสดงของตัวแปร

type

string

ประเภทตัวแปร GTM

notes

string

หมายเหตุของผู้ใช้เกี่ยวกับวิธีใช้ตัวแปรนี้ในคอนเทนเนอร์

scheduleStartMs

string (int64 format)

การประทับเวลาเริ่มต้นเป็นมิลลิวินาทีเพื่อกำหนดเวลาตัวแปร

scheduleEndMs

string (int64 format)

การประทับเวลาสิ้นสุดเป็นมิลลิวินาทีเพื่อกำหนดเวลาตัวแปร

parameter[]

object (Parameter)

พารามิเตอร์ของตัวแปร

enablingTriggerId[]

string

สำหรับคอนเทนเนอร์บนอุปกรณ์เคลื่อนที่เท่านั้น: รายการรหัสทริกเกอร์สำหรับการเปิดใช้ตัวแปรแบบมีเงื่อนไข โดยตัวแปรจะเปิดใช้หากทริกเกอร์ที่เปิดใช้รายการใดรายการหนึ่งเป็นจริง ขณะที่ทริกเกอร์ที่ปิดใช้ทั้งหมดเป็นเท็จ ถือเป็นชุดที่ไม่มีลำดับ

disablingTriggerId[]

string

สำหรับคอนเทนเนอร์บนอุปกรณ์เคลื่อนที่เท่านั้น: รายการรหัสทริกเกอร์สำหรับการปิดใช้ตัวแปรแบบมีเงื่อนไข โดยตัวแปรจะเปิดใช้หากทริกเกอร์ที่เปิดใช้รายการใดรายการหนึ่งเป็นจริง ขณะที่ทริกเกอร์ที่ปิดใช้ทั้งหมดเป็นเท็จ ถือเป็นชุดที่ไม่มีลำดับ

fingerprint

string

ลายนิ้วมือของตัวแปร GTM ที่คำนวณ ณ เวลาจัดเก็บ ระบบจะคำนวณค่านี้ใหม่ทุกครั้งที่แก้ไขตัวแปร

parentFolderId

string

รหัสโฟลเดอร์ระดับบน

tagManagerUrl

string

ลิงก์ที่สร้างขึ้นโดยอัตโนมัติไปยัง UI ของ Tag Manager

formatValue

object (FormatValue)

ตัวเลือกในการแปลงค่าตัวแปรเป็นค่าอื่น

FormatValue

การแสดง JSON
{
  "caseConversionType": enum (CaseConversionType),
  "convertToNumber": enum (DecimalSeparatorType),
  "convertNullToValue": {
    object (Parameter)
  },
  "convertUndefinedToValue": {
    object (Parameter)
  },
  "convertToBoolean": boolean,
  "convertTrueToValue": {
    object (Parameter)
  },
  "convertFalseToValue": {
    object (Parameter)
  }
}
ช่อง
caseConversionType

enum (CaseConversionType)

ตัวเลือกในการแปลงค่าตัวแปรประเภทสตริงเป็นตัวพิมพ์เล็กหรือตัวพิมพ์ใหญ่

convertToNumber

enum (DecimalSeparatorType)

ตัวเลือกในการแปลงค่าตัวแปรเป็นตัวเลข

convertNullToValue

object (Parameter)

ค่าที่จะแปลงหากค่าตัวแปรเป็น Null

convertUndefinedToValue

object (Parameter)

ค่าที่จะแปลงหากค่าตัวแปรไม่ได้กำหนด

convertToBoolean

boolean

ตัวเลือกในการแปลงค่าตัวแปรเป็นบูลีน

convertTrueToValue

object (Parameter)

ค่าที่จะแปลงหากค่าตัวแปรเป็นจริง

convertFalseToValue

object (Parameter)

ค่าที่จะแปลงหากค่าตัวแปรเป็นเท็จ

CaseConversionType

Enum
none
lowercase ตัวเลือกในการแปลงค่าตัวแปรเป็นตัวพิมพ์เล็ก
uppercase ตัวเลือกในการแปลงค่าตัวแปรเป็นตัวพิมพ์ใหญ่

DecimalSeparatorType

Enum
decimalSeparatorTypeUnspecified
period ตัวเลือกในการแปลงค่าตัวแปรเป็นตัวเลขโดยใช้จุดเป็นตัวคั่นทศนิยม
comma ตัวเลือกในการแปลงค่าตัวแปรเป็นตัวเลขโดยใช้คอมมาเป็นตัวคั่นทศนิยม
automatic ตัวเลือกในการแปลงค่าตัวแปรเป็นตัวเลขโดยใช้การตรวจหาตัวคั่นทศนิยมอัตโนมัติ

เมธอด

create

สร้างตัวแปร GTM

delete

ลบตัวแปร GTM

get

รับตัวแปร GTM

list

แสดงรายการตัวแปร GTM ทั้งหมดของคอนเทนเนอร์

revert

เปลี่ยนกลับการเปลี่ยนแปลงตัวแปร GTM ในพื้นที่ทำงาน GTM

update

อัปเดตตัวแปร GTM