Dimension
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
維度是資料的屬性。舉例來說,維度「城市」會指出事件的來源城市。報表回應中的維度值是字串,例如「巴黎」或「紐約」。要求最多可包含 9 個維度。
欄位 |
name |
string
維度的名稱。如需 runReport 和 batchRunReports 等核心報表方法支援的維度名稱清單,請參閱 API 維度。如需 runRealtimeReport 方法支援的維度名稱清單,請參閱「即時維度」。如需 runFunnelReport 方法支援的維度名稱清單,請參閱「漏斗維度」。 如果指定 dimensionExpression ,name 可以是允許字元集內的任何字串。舉例來說,如果 dimensionExpression 串連 country 和 city ,您可以呼叫該維度 countryAndCity 。您選擇的維度名稱必須與規則運算式 ^[a-zA-Z0-9_]$ 相符。 dimensionFilter 、orderBys 、dimensionExpression 和 pivots 中 name 會參照維度。
|
dimensionExpression |
object (DimensionExpression )
多個維度可能是多個維度的運算式結果。例如,維度「country, city」: concatenate(country, ", ", city)。
|
DimensionExpression
用來表示維度,這是多個維度公式的結果。使用範例:1) 以下版本(維度) 2) concatenate(dimension1, 符號, dimension2)。
JSON 表示法 |
{
// Union field one_expression can be only one of the following:
"lowerCase": {
object (CaseExpression )
},
"upperCase": {
object (CaseExpression )
},
"concatenate": {
object (ConcatenateExpression )
}
// End of list of possible types for union field one_expression .
} |
欄位 |
聯集欄位 one_expression 。為 DimensionExpression 指定一種維度運算式類型。one_expression 只能採用下列其中一種設定: |
lowerCase |
object (CaseExpression )
用於將維度值轉換為小寫。
|
upperCase |
object (CaseExpression )
用來將維度值轉換為大寫。
|
concatenate |
object (ConcatenateExpression )
用來將維度值合併為單一維度。例如,維度「country, city」: concatenate(country, ", ", city)。
|
CaseExpression
JSON 表示法 |
{
"dimensionName": string
} |
欄位 |
dimensionName |
string
維度的名稱。名稱必須傳回請求維度欄位中的名稱。
|
ConcatenateExpression
JSON 表示法 |
{
"dimensionNames": [
string
],
"delimiter": string
} |
欄位 |
dimensionNames[] |
string
維度的名稱。名稱必須傳回請求維度欄位中的名稱。
|
delimiter |
string
維度名稱之間的分隔符號。 分隔符號通常為單一字元 (例如「|」或「,」),但可以有較長的字串。如果維度值包含分隔字元,則兩者都會出現在回應中,不會有任何差異。舉例來說,如果維度 1 值 =「US,FR」,維度 2 值 =「JP」,且分隔符號 =「,」,則回應會包含「US,FR,JP」。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-05-02 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]