试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
MatchingCondition
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
JSON 表示法 |
{
"field": string,
"comparisonType": enum (ComparisonType ),
"value": string,
"negated": boolean
} |
字段 |
field |
string
必需。要与之进行比较的字段的名称。如果为“eventName”则此条件将应用于事件名称。否则,该条件将应用于具有指定名称的参数。 此值不能包含空格。
|
comparisonType |
enum (ComparisonType )
必需。要应用于值的比较类型。
|
value |
string
必需。为此条件进行比较的值。运行时实现可能会对此值执行类型强制转换,以根据参数值的类型评估此条件。
|
negated |
boolean
是否应否定比较结果。例如,如果 negated 为 true,则“等于”比较会起到“不等于”的作用。
|
ComparisonType
枚举 |
COMPARISON_TYPE_UNSPECIFIED |
未知 |
EQUALS |
等于,区分大小写 |
EQUALS_CASE_INSENSITIVE |
等于,不区分大小写 |
CONTAINS |
包含,区分大小写 |
CONTAINS_CASE_INSENSITIVE |
包含,不区分大小写 |
STARTS_WITH |
开头为(区分大小写) |
STARTS_WITH_CASE_INSENSITIVE |
开头为,不区分大小写 |
ENDS_WITH |
结尾为(区分大小写) |
ENDS_WITH_CASE_INSENSITIVE |
结尾为,不区分大小写 |
GREATER_THAN |
大于 |
GREATER_THAN_OR_EQUAL |
大于或等于 |
LESS_THAN |
小于 |
LESS_THAN_OR_EQUAL |
小于或等于 |
REGULAR_EXPRESSION |
正则表达式。仅适用于网站数据流。 |
REGULAR_EXPRESSION_CASE_INSENSITIVE |
正则表达式(不区分大小写)。仅适用于网站数据流。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eMatchingCondition defines criteria for when an Event Edit or Event Creation rule is applied, based on event properties.\u003c/p\u003e\n"],["\u003cp\u003eIt uses a comparison between a specified event field and a given value, with options for case sensitivity and negation.\u003c/p\u003e\n"],["\u003cp\u003eSupported comparison types include equality, containment, starts/ends with, greater/less than, and regular expressions (web streams only).\u003c/p\u003e\n"],["\u003cp\u003eThe condition can be applied to the event name or any event parameter, enabling flexible rule creation.\u003c/p\u003e\n"]]],["This describes a matching condition used in event rules, defined via a JSON object with `field`, `comparisonType`, `value`, and `negated`. The `field` specifies the parameter or 'eventName' for comparison. The `comparisonType` defines the comparison method, such as `EQUALS`, `CONTAINS`, or `GREATER_THAN`. The `value` is the comparison target, and `negated` inverts the comparison result. Available `comparisonType` options also include case-insensitive variants and regular expression matching.\n"],null,["# MatchingCondition\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ComparisonType](#ComparisonType)\n\nDefines a condition for when an Event Edit or Event Creation rule applies to an event.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"field\": string, \"comparisonType\": enum (/analytics/devguides/config/admin/v1/rest/v1alpha/MatchingCondition#ComparisonType), \"value\": string, \"negated\": boolean } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `field` | `string` Required. The name of the field that is compared against for the condition. If 'eventName' is specified this condition will apply to the name of the event. Otherwise the condition will apply to a parameter with the specified name. This value cannot contain spaces. |\n| `comparisonType` | `enum (`[ComparisonType](/analytics/devguides/config/admin/v1/rest/v1alpha/MatchingCondition#ComparisonType)`)` Required. The type of comparison to be applied to the value. |\n| `value` | `string` Required. The value being compared against for this condition. The runtime implementation may perform type coercion of this value to evaluate this condition based on the type of the parameter value. |\n| `negated` | `boolean` Whether or not the result of the comparison should be negated. For example, if `negated` is true, then 'equals' comparisons would function as 'not equals'. |\n\nComparisonType\n--------------\n\nComparison type for matching condition\n\n| Enums ||\n|---------------------------------------|-----------------------------------------------------------------------|\n| `COMPARISON_TYPE_UNSPECIFIED` | Unknown |\n| `EQUALS` | Equals, case sensitive |\n| `EQUALS_CASE_INSENSITIVE` | Equals, case insensitive |\n| `CONTAINS` | Contains, case sensitive |\n| `CONTAINS_CASE_INSENSITIVE` | Contains, case insensitive |\n| `STARTS_WITH` | Starts with, case sensitive |\n| `STARTS_WITH_CASE_INSENSITIVE` | Starts with, case insensitive |\n| `ENDS_WITH` | Ends with, case sensitive |\n| `ENDS_WITH_CASE_INSENSITIVE` | Ends with, case insensitive |\n| `GREATER_THAN` | Greater than |\n| `GREATER_THAN_OR_EQUAL` | Greater than or equal |\n| `LESS_THAN` | Less than |\n| `LESS_THAN_OR_EQUAL` | Less than or equal |\n| `REGULAR_EXPRESSION` | regular expression. Only supported for web streams. |\n| `REGULAR_EXPRESSION_CASE_INSENSITIVE` | regular expression, case insensitive. Only supported for web streams. |"]]