/schemas/v3/media-buy/log-event-request.json
Response Schema: /schemas/v3/media-buy/log-event-response.json
Quick Start
Log a purchase event:Request Parameters
Event Object
User Match Object
At least one ofuids, hashed_email, hashed_phone, click_id, or client_ip + client_user_agent is required:
Hashing: Hashed identifiers must be SHA-256 hex strings (64 characters, lowercase). Normalize before hashing: emails to lowercase with whitespace trimmed, phone numbers to E.164 format (e.g.
+12065551234).
Custom Data Object
Response
Success Response:events_received- Number of events receivedevents_processed- Number of events successfully queuedpartial_failures- Events that failed validation (with event_id, code, message)warnings- Non-fatal issues (low match quality, missing fields)match_quality- Overall match quality score (0.0 to 1.0)
errors- Array of operation-level errors (invalid event source, auth failure)
Common Scenarios
Creator Engagement Events
Log creator or content engagement events against the configured owned-property source. Usesurface to identify the property and put watch thresholds in custom_data.progress_percent or custom_data.progress_seconds.
test=false
event_type: "follow". Reserve event_type: "subscribe" for paid subscriptions or paid memberships.
Batch Events
Send multiple events in a single request:Test Events
Validate event integration without affecting production data:In-Store Conversions
Report offline conversions using CRM data:Event Deduplication
Events are deduplicated by the combination ofevent_id + event_type + event_source_id. Sending the same event multiple times is safe - duplicates are silently ignored.
Choose event_id values that are stable across retries:
- Transaction IDs:
"order_98765" - Composite keys:
"purchase_user123_20260115" - UUIDs:
"550e8400-e29b-41d4-a716-446655440000"
Error Handling
Best Practices
-
Configure sources first - Always run
sync_event_sourcesbefore sending events. Events sent to unconfigured sources are rejected. - Include user_match - Events without user identifiers cannot be attributed. Provide the strongest identifiers available: hashed email/phone > UIDs > click IDs > IP/UA. Send multiple identifier types when available to maximize match rates.
-
Use test events first - Set
test_event_codeduring integration to validate events appear correctly without affecting production data. - Batch when possible - Send up to 10,000 events per request to reduce API calls. Events within a batch are processed independently.
-
Include value and currency - For purchase events, always include
custom_data.valueandcustom_data.currencyto enable ROAS reporting and optimization. - Stable event IDs - Use deterministic event IDs (order numbers, transaction IDs) rather than random UUIDs. This ensures safe retries without duplicate counting.
- Send events promptly - Log events as close to real-time as possible. Events outside the seller’s attribution window may not be matched.
Next Steps
- Conversion Tracking - Data model, optimization goals, and the end-to-end flow
- sync_event_sources - Configure event sources before logging events
- create_media_buy - Set optimization goals on packages
- get_media_buy_delivery - Monitor conversion metrics in delivery reports