试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
Comparison
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
定义单个比较。大多数请求都会包含多个对比项,以便报告在对比项之间进行比较。
JSON 表示法 |
{
"name": string,
// Union field one_comparison can be only one of the following:
"dimensionFilter": {
object (FilterExpression )
},
"comparison": string
// End of list of possible types for union field one_comparison .
} |
字段 |
name |
string
每个比较都会在响应中生成单独的行。在响应中,此比较项将通过此名称标识。如果未指定名称,我们将使用已保存的比较项的显示名称。
|
联合字段 one_comparison 。一种比较值 one_comparison 只能是以下任一项: |
dimensionFilter |
object (FilterExpression )
基本比较。
|
comparison |
string
已保存的比较,由比较项的资源名称标识。例如,'comparisons/1234'。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eJSON representation defines individual comparisons, often used in reports to compare multiple aspects.\u003c/p\u003e\n"],["\u003cp\u003eEach comparison has a name for identification and uses either a \u003ccode\u003edimensionFilter\u003c/code\u003e or a saved \u003ccode\u003ecomparison\u003c/code\u003e for defining the comparison logic.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003edimensionFilter\u003c/code\u003e allows for basic comparisons using FilterExpression, while \u003ccode\u003ecomparison\u003c/code\u003e utilizes a saved comparison resource for complex scenarios.\u003c/p\u003e\n"],["\u003cp\u003eThe response data will present each comparison in separate rows, identified by their respective names.\u003c/p\u003e\n"]]],["The content defines a comparison structure for reporting. Each comparison has a `name` for identification in the response. A comparison can be defined in one of two ways: by a `dimensionFilter` object, which specifies a basic filter criteria; or by referencing a pre-existing saved `comparison` via its resource name. Multiple comparisons are used together to create a report, each comparison generating separate rows in the output.\n"],null,["# Comparison\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nDefines an individual comparison. Most requests will include multiple comparisons so that the report compares between the comparisons.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, // Union field `one_comparison` can be only one of the following: \"dimensionFilter\": { object (/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression) }, \"comparison\": string // End of list of possible types for union field `one_comparison`. } ``` |\n\n| Fields ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Each comparison produces separate rows in the response. In the response, this comparison is identified by this name. If name is unspecified, we will use the saved comparisons display name. |\n| Union field `one_comparison`. One kind of comparison value `one_comparison` can be only one of the following: ||\n| `dimension``Filter` | `object (`[FilterExpression](/analytics/devguides/reporting/data/v1/rest/v1beta/FilterExpression)`)` A basic comparison. |\n| `comparison` | `string` A saved comparison identified by the comparison's resource name. For example, 'comparisons/1234'. |"]]