account | array (also accepts a comma-separated string) | No | - | The GA4 property to change. Only one property at a time. |
action | string or SelectableOption | Yes | - | ‘create’ marks events as key events (conversions), ‘update’ changes the counting method or default value of existing key events, ‘delete’ removes events from the key events list. Options: ‘create’, ‘update’, ‘delete’. |
event_names | string or array of string | Yes | - | Event name(s) to apply the action to, e.g. ‘purchase’ or [‘sign_up’, ‘generate_lead’]. Existing key events can be read with ga4_get_property_settings (setting_type ‘key_events’). |
counting_method | string or SelectableOption | No | - | How often the key event is counted: ‘ONCE_PER_EVENT’ (every occurrence) or ‘ONCE_PER_SESSION’ (at most once per session). Defaults to ONCE_PER_EVENT on create. |
default_value | number | No | - | Default monetary value to count when the event has no value, e.g. 25. |
default_currency | string | No | - | Currency of default_value as a 3-letter code, e.g. ‘USD’. Required with default_value. |