Google Analytics: Mark Key Event
ga4_mark_key_eventMark an event as a key event (conversion) in one GA4 property of the user's connected Google Analytics login, with a counting method and optional default value. If the event is already a key event, nothing changes and its current settings are returned (change them with ga4_update_key_event). Marking does not create the event or convert past data: GA4 must receive the event, and reports update within about 24 hours. dry_run previews. Changes configuration only after the user approved it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"property_id": "<property_id>",
"event_name": "<event_name>"
},
"name": "ga4_mark_key_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | true: read the current configuration and report the field-level changes this call would make, changing nothing. Default false. Show the user the proposal and get their approval before calling without dry_run. | |
| event_name | Yes | The event to mark, e.g. purchase or generate_lead. | |
| property_id | Yes | The GA4 property: its number (123456789) or properties/123456789. Must be one of the properties ga4_get_account_summaries lists for the connected login. | |
| currency_code | No | ISO currency of default_value, e.g. USD. | |
| default_value | No | Value recorded when the event carries no value parameter. Needs currency_code. | |
| counting_method | No | ONCE_PER_EVENT counts every occurrence (purchases); ONCE_PER_SESSION counts one per session (leads, sign-ups). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | The resource after the call (Google's read-back), or the proposal on a dry run. | |
| before | No | The resource before the call; null when it did not exist. | |
| dryRun | Yes | True when the call only previewed the change. | |
| changed | Yes | True only when this call changed Google Analytics. | |
| changes | Yes | Field-level changes: made, or proposed on a dry run. | |
| property | Yes | properties/<number>. | |
| resource | No | Resource name the change targets, when it exists. | |
| verified | No | Whether Google's read-back holds every requested value; null when nothing was written. | |
| operation | Yes | What happened: the change made, no_change, or dry_run. |