REST Resource: properties.customDimensions
資源:CustomDimension
JSON 表示法 |
{
"name": string,
"parameterName": string,
"displayName": string,
"description": string,
"scope": enum (DimensionScope ),
"disallowAdsPersonalization": boolean
} |
欄位 |
name |
string
僅供輸出。這個 CustomDimension 資源的資源名稱。格式:properties/{property}/customDimensions/{customDimension}
|
parameterName |
string
必要欄位。不可變動。這個自訂維度的代碼參數名稱。 如果這是以使用者為範圍的維度,則為使用者屬性名稱。如果這是以事件為範圍的維度,則為事件參數名稱。 如果這是以商品為範圍的維度,則這是電子商務商品陣列中的參數名稱。 只能使用英數字元和底線字元,開頭須為英文字母。使用者界定範圍維度的長度上限為 24 個半形字元,事件界定範圍維度的長度上限為 40 個半形字元。
|
displayName |
string
必要欄位。Analytics 使用者介面中顯示的這項自訂維度顯示名稱。長度上限為 82 個字元,開頭須為英文字母,且只能使用英數字元、空格和底線。舊版系統產生的顯示名稱可能包含方括號,但這個欄位的更新作業絕不會允許方括號。
|
description |
string
選用設定。這個自訂維度的說明。長度上限為 150 個字元。
|
scope |
enum (DimensionScope )
必要欄位。不可變動。這個維度的範圍。
|
disallowAdsPersonalization |
boolean
選用設定。如果設為 true,系統會將這個維度設為 NPA,並將其排除在廣告個人化設定之外。 這項功能目前僅支援使用者界定範圍的自訂維度。
|
DimensionScope
列舉 |
DIMENSION_SCOPE_UNSPECIFIED |
範圍不明或未指定。 |
EVENT |
以事件為範圍的維度。 |
USER |
以使用者為範圍的維度。 |
ITEM |
以電子商務商品為範圍的維度 |
方法 |
|
將資源中的自訂維度封存。 |
|
建立 CustomDimension。 |
|
查詢單一 CustomDimension。 |
|
列出資源上的 CustomDimensions。 |
|
更新資源的 CustomDimension。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-14 (世界標準時間)。
[null,null,["上次更新時間:2025-01-14 (世界標準時間)。"],[[["`CustomDimension` resource allows defining custom dimensions with specific parameters like name, display name, description, scope, and whether it's excluded from ads personalization."],["The scope of a custom dimension can be `EVENT`, `USER`, or `ITEM`, determining the level at which the dimension is applied."],["You can manage custom dimensions using methods like `create`, `get`, `list`, `update`, and `archive` to control their lifecycle within your Google Analytics 4 property."],["Custom dimensions can be user-scoped, event-scoped or item-scoped, each with specific requirements for the parameter name used."],["The JSON representation of a `CustomDimension` includes fields for essential properties, allowing programmatic management of custom dimensions."]]],["Custom dimensions are defined with properties like `name`, `parameterName`, `displayName`, `description`, `scope`, and `disallowAdsPersonalization`. The `parameterName` is a tagging parameter, while `scope` defines if it's for events, users, or items. Actions include creating, getting, listing, patching, and archiving a custom dimension. The `DimensionScope` can be `EVENT`, `USER`, or `ITEM`. `disallowAdsPersonalization` excludes the dimension from ads personalization and is only supported for user-scoped custom dimensions.\n"]]