Google アナリティクスの MCP サーバーを試します。
GitHub からインストールし、詳細については
お知らせをご覧ください。
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 )
1 つのディメンションは、複数のディメンションの式の結果にすることができます。たとえば、ディメンション「country, city」: concatenate(country, ", ", city)。
|
DimensionExpression
複数のディメンションの式の結果であるディメンションを表すために使用します。使用例: 1)lowerCase(ディメンション) 2)concatenate(ディメンション 1、記号、ディメンション 2)。
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 に 1 つのタイプのディメンション式を指定します。one_expression は次のいずれかになります。 |
lowerCase |
object (CaseExpression )
ディメンション値を小文字に変換するために使用します。
|
upperCase |
object (CaseExpression )
ディメンション値を大文字に変換するために使用します。
|
concatenate |
object (ConcatenateExpression )
ディメンションの値を 1 つのディメンションに結合するために使用します。たとえば、ディメンション「country, city」: concatenate(country, ", ", city)。
|
CaseExpression
ディメンション値を単一のケースに変換するために使用します。
JSON 表現 |
{
"dimensionName": string
} |
フィールド |
dimensionName |
string
ディメンションの名前。この名前は、リクエストのディメンション フィールドの名前を参照する必要があります。
|
ConcatenateExpression
ディメンションの値を 1 つのディメンションに結合するために使用します。
JSON 表現 |
{
"dimensionNames": [
string
],
"delimiter": string
} |
フィールド |
dimensionNames[] |
string
ディメンションの名前。名前は、リクエストのディメンション フィールドの名前を参照する必要があります。
|
delimiter |
string
ディメンション名の間に配置する区切り文字。 区切り文字は通常「|」や「,」などの 1 文字ですが、長い文字列にすることもできます。ディメンション値に区切り文字が含まれている場合、レスポンスには区切り文字が付加された値と区切り文字が付加されていない値の両方が含まれます。たとえば、ディメンション 1 の値が「US,FR」、ディメンション 2 の値が「JP」、区切り文字が「,」の場合、レスポンスには「US,FR,JP」が含まれます。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eDimensions represent data attributes, like city or country, and are limited to 9 per request.\u003c/p\u003e\n"],["\u003cp\u003eYou can create custom dimensions using expressions that manipulate existing dimensions (e.g., lowercase, concatenate).\u003c/p\u003e\n"],["\u003cp\u003eDimension expressions can combine multiple dimensions with delimiters, such as joining country and city with a comma.\u003c/p\u003e\n"],["\u003cp\u003eDimension names in expressions should refer to existing dimension names defined in the request.\u003c/p\u003e\n"],["\u003cp\u003eWhen using delimiters, ensure they don't clash with values within your dimension data to avoid ambiguity.\u003c/p\u003e\n"]]],["This document outlines the structure and usage of dimensions in data reporting, focusing on creating custom dimensions. Dimensions are data attributes, like \"city.\" You can define a `dimension` with a `name` and an optional `dimensionExpression`. `DimensionExpression` allows combining or modifying existing dimensions using `lowerCase`, `upperCase`, or `concatenate` functions. `CaseExpression` changes dimension cases. `ConcatenateExpression` merges dimension values with a specified `delimiter`. Each dimension name is a string with allowed characters.\n"],null,[]]