試用 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 |
規則運算式,區分大小寫。僅支援網站串流。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]