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 to send to. The measurement id (web) or Firebase app id (apps) and a Measurement Protocol secret are read from the stream; a secret named ‘Markifact’ is created on the stream if it has none. Read stream ids from ga4_get_property_settings with setting ‘data_streams’. |
client_id | string | No | - | Web streams: the visitor’s GA client id, e.g. ‘1234567890.1700000000’ (the _ga cookie value without the ‘GA1.1.’ prefix). Required for web streams so the event joins the visitor’s history. |
app_instance_id | string | No | - | App streams: the Firebase app instance id of the device. Required for app streams. |
user_id | string | No | - | Optional user id for cross-device analysis. |
events | array of object or string | Yes | - | Events to send, as the Measurement Protocol events array (object or JSON string): [{“name”:“purchase”,“params”:{“transaction_id”:“T123”,“value”:99.9,“currency”:“USD”,“session_id”:“1700000000”,“engagement_time_msec”:100,“items”:[{“item_id”:“SKU1”,“item_name”:“Plan”,“price”:99.9,“quantity”:1}]}}]. Include params.session_id and params.engagement_time_msec so the events appear in standard reports. Event names max 40 chars, 25 params per event; more than 25 events are sent in batches. Google validates names and values. |
timestamp_micros | integer | No | - | Unix time in microseconds for all events, at most 72 hours in the past. Omit for now. |
user_properties | object or string | No | - | Optional user properties object: {“plan”:{“value”:“pro”}}. Max 25. |
consent | object or string | No | - | Optional consent object: {“ad_user_data”:“GRANTED”,“ad_personalization”:“DENIED”}. |
region | string or SelectableOption | No | - | ‘global’ (default) or ‘eu’ to send through Google’s EU collection endpoint. |
validate_only | boolean | No | - | When true, events are only validated by Google and not recorded. |