Draft an Analytics key event
draft_key_eventDraft marking a GA4 event as a key event, or change its counting method and default value, returning a preview with a plan_id so nothing changes until confirmed.
Instructions
Draft marking a GA4 event as a key event (conversion), or changing an existing one — returns a PREVIEW.
The fix for "the event fires but isn't tracked as a conversion": attribution_check / validate_tracking diagnose it, this closes the loop. When the event already is a key event, the plan changes its counting method or default value instead and the preview shows before and after; nothing to change returns NO_CHANGE. Applies to future data only. Returns a preview with a plan_id and warnings; nothing changes until confirm_and_apply applies it.
Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1
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": {
"event_name": "<event_name>"
},
"name": "draft_key_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_name | Yes | Name of the GA4 event to mark as a key event, exactly as it fires (e.g. "sign_up", "purchase"). Required. | |
| property_id | No | Numeric GA4 property ID, with or without the "properties/" prefix. If empty, uses the default from config. | |
| currency_code | No | Three-letter currency of default_value, e.g. "EUR". | |
| default_value | No | Value GA4 gives each key event when the event sends no value parameter, e.g. 20 for a lead. Needs currency_code. | |
| counting_method | No | ONCE_PER_EVENT (counts every occurrence, e.g. purchases) or ONCE_PER_SESSION (counts once per session, e.g. sign-ups). Defaults to ONCE_PER_EVENT. | ONCE_PER_EVENT |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||