{
  "kind": "api_request",
  "api": "Google Analytics Admin API (v1beta)",
  "method": "POST",
  "endpoint": "https://analyticsadmin.googleapis.com/v1beta/{parent=properties/*}/keyEvents",
  "scope": "https://www.googleapis.com/auth/analytics.edit",
  "request_body": {
    "eventName": "generate_lead",
    "countingMethod": "ONCE_PER_SESSION",
    "defaultValue": {
      "numericValue": 25,
      "currencyCode": "CAD"
    }
  },
  "counting_methods": {
    "ONCE_PER_EVENT": "Each event instance is considered a Key Event",
    "ONCE_PER_SESSION": "An event instance is considered a Key Event at most once per session per user"
  },
  "response_fields": [
    "name",
    "eventName",
    "createTime",
    "deletable",
    "custom",
    "countingMethod",
    "defaultValue"
  ],
  "deprecated": "properties.conversionEvents.create \u2014 use CreateKeyEvent instead",
  "guide": "mark-key-event-with-admin-api",
  "title": "Mark a key event with the Admin API: one POST, the counting method, and the default value",
  "worked_example": {
    "event_name": "generate_lead",
    "counting_method": "ONCE_PER_SESSION",
    "default_value_per_occurrence": "25.00",
    "default_currency": "CAD",
    "occurrences_without_value": 4,
    "value_attributed_by_default": "100.00",
    "events_in_one_session": 3,
    "counted_once_per_event": 3,
    "counted_once_per_session": 1
  },
  "verification": "Figures recomputed in Python 3 with decimal arithmetic, 2026-11-11. No live GA4 run."
}
