Inputs
SelectableOption
Output
Type:Dict
Returns the saved rule: id, conditions, parameter mutations, and destination event or display name and processing order.
Fields: dynamic (depend on the inputs)Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Creates, updates, deletes or reorders Google Analytics 4 event rules on a data stream: Create Event rules derive a new event from a matching one (e.g
| App | GA4 |
| Operation ID | ga4_manage_event_rules |
| Type | Action |
| Connection | ga4 (required) |
| Credits per run | 1 |
| Agent / MCP tool | Yes |
| Requires approval | Yes (write operation) |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
account | array (also accepts a comma-separated string) | No | - | The GA4 property that owns the data stream. Only one property at a time. |
data_stream_id | string | Yes | - | Numeric id of the data stream the rule belongs to, e.g. ‘7613215464’. Read it from ga4_get_property_settings with setting ‘data_streams’. |
rule_type | string or SelectableOption | Yes | - | ‘create’ for Create Event rules, which make a new event from a matching source event (e.g. generate_lead from form_submit); ‘edit’ for Modify Event rules, which change parameters of a matching event in place. Options: ‘create’, ‘edit’. |
action | string or SelectableOption | Yes | - | ‘create’, ‘update’ or ‘delete’ a rule; ‘reorder’ sets the processing order of all Modify Event rules on the stream (rule_type ‘edit’ only). Options: ‘create’, ‘update’, ‘delete’, ‘reorder’. |
rule_id | string | No | - | Numeric id of the rule to update or delete, e.g. ‘1234567890’. |
destination_event | string | No | - | Create Event rules: name of the new event, e.g. ‘generate_lead’. Under 40 characters, letters, digits and underscores only. Required on create. |
display_name | string | No | - | Modify Event rules: name of the rule shown in GA4 (max 255 chars). Required on create. |
event_conditions | array of object or string | No | - | Conditions a source event must meet, as the Admin API eventConditions array (object or JSON string), sent as-is: each has field (an event parameter name or ‘event_name’), comparisonType (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), value and optional negated. Example: [{“field”:“event_name”,“comparisonType”:“EQUALS”,“value”:“form_submit”},{“field”:“form_id”,“comparisonType”:“EQUALS”,“value”:“contact”}]. One to ten conditions. Required on create. |
source_copy_parameters | boolean | No | - | Create Event rules: copy the source event’s parameters onto the new event. |
parameter_mutations | array of object or string | No | - | Parameters to set on the resulting event, as the Admin API parameterMutations array (object or JSON string), applied in order: [{“parameter”:“lead_source”,“parameterValue”:“website”}]. Use the value ‘[[param]]’ to copy another parameter. Up to 20 mutations. Required on create for Modify Event rules, optional for Create Event rules. |
rule_ids | string or array of string | No | - | reorder only: every Modify Event rule id on the stream in the desired processing order, e.g. [‘123’, ‘456’]. |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | string | Yes | - | |
label | string | Yes | - |
Dict
Returns the saved rule: id, conditions, parameter mutations, and destination event or display name and processing order.
Fields: dynamic (depend on the inputs)