Overview
Scope3’s Conversion API follows the AdCPlog_event specification for server-to-server conversion measurement. This enables you to:
- Send purchase, sign-up, and other conversion events
- Attribute conversions back to ad impressions and clicks
- Optimize campaigns based on actual outcomes
Prerequisites
Before sending conversion events, you’ll need two things:1. Configure an Event Source
Use thesync_event_sources MCP tool to register an event source for your account. This gives you an event_source_id to include in all event requests:
action field on each result will be one of created, updated, unchanged, failed, or deleted. Pass "delete_missing": true to archive any previously-configured sources not included in the payload.
2. Get Your API Key
- Visit agentic.scope3.com/api-keys
- Sign up or log into your Scope3 account
- Generate a new API key (starts with
scope3_)
Endpoints
- Production
- Staging
Request Format
Minimal Example (Purchase with Click ID)
Full Example (with Identity Tokens and Line Items)
Batch Example (Multiple Events)
Send up to 10,000 events in a single request:Request Fields
Top-Level
| Field | Type | Required | Description |
|---|---|---|---|
event_source_id | string | Yes | Event source ID configured via sync_event_sources |
events | Event[] | Yes | Events to log (min 1, max 10,000) |
test_event_code | string | No | Validate events without affecting production data (see Test Events) |
Event Object
| Field | Type | Required | Description |
|---|---|---|---|
event_id | string | Yes | Unique identifier for deduplication (scoped to event_type + event_source_id). Max 256 chars. |
event_type | string | Yes | Standard event type (see Supported Event Types) |
event_time | string | Yes | ISO 8601 timestamp when the event occurred |
user_match | UserMatch | No | User identifiers for attribution matching |
custom_data | CustomData | No | Event-specific data (value, currency, items) |
action_source | string | No | Where the event occurred (website, app, in_store, crm, phone_call, chat, physical_store, system_generated) |
event_source_url | string | No | URL where the event occurred (recommended when action_source is website) |
custom_event_name | string | No | Name for custom events (used when event_type is custom) |
UserMatch Object
| Field | Type | Description |
|---|---|---|
click_id | string | Click identifier from the landing page URL (see Click Attribution) |
click_id_type | string | Type of click ID. For Scope3, use sc3clid. Also accepts gclid, fbclid, ttclid, etc. |
uids | UID[] | Pre-resolved universal IDs (rampid, id5, uid2, euid, pairid, maid) |
hashed_email | string | SHA-256 hash of lowercase, trimmed email address (64-char hex) |
hashed_phone | string | SHA-256 hash of E.164-formatted phone number (64-char hex) |
client_ip | string | Client IP address for probabilistic matching |
client_user_agent | string | Client user agent string for probabilistic matching |
CustomData Object
| Field | Type | Description |
|---|---|---|
value | number | Monetary value of the event |
currency | string | ISO 4217 currency code (e.g. USD, EUR, GBP) |
order_id | string | Unique order or transaction identifier |
num_items | integer | Number of items in the event |
content_ids | string[] | Product or content identifiers (e.g. SKUs, GTINs) |
content_type | string | Category of content (e.g. product, service) |
contents | Content[] | Per-item details: id, quantity, price |
Supported Event Types
Commerce Events
Commerce Events
| Event Type | Description |
|---|---|
add_to_cart | User added an item to cart |
remove_from_cart | User removed an item from cart |
viewed_cart | User viewed their shopping cart |
add_to_wishlist | User added an item to a wishlist |
initiate_checkout | User started checkout process |
add_payment_info | User added payment information |
purchase | User completed a purchase |
refund | A purchase was fully or partially refunded (adjusts ROAS) |
Lead & Registration Events
Lead & Registration Events
| Event Type | Description | |------------|-------------| |
lead | User
expressed interest (form submission, signup, etc.) | | qualify_lead | Lead
qualified by sales or scoring criteria | | close_convert_lead | Lead
converted to a customer or closed deal | | disqualify_lead | Lead
disqualified or marked as not viable | | complete_registration | User
completed account registration | | subscribe | User subscribed to a service
or newsletter | | start_trial | User started a free trial | |
submit_application | User submitted an application (loan, job, etc.) |Engagement Events
Engagement Events
| Event Type | Description | |------------|-------------| |
page_view | User
viewed a page | | view_content | User viewed specific content (product,
article, etc.) | | select_content | User selected or clicked on content | |
select_item | User selected a specific product or item from a list | |
search | User performed a search | | share | User shared content via
social or messaging |App & Other Events
App & Other Events
| Event Type | Description |
|---|---|
app_install | User installed an application |
app_launch | User launched an application |
contact | User initiated contact (call, message, etc.) |
schedule | User scheduled an appointment or event |
donate | User made a donation |
custom | Custom event type (specify in custom_event_name) |
Attribution Methods
Scope3 supports two attribution methods depending on your use case:| Method | Use Case | How It Works |
|---|---|---|
| Click Attribution | Online conversions (same session/device) | Pass the sc3clid from the landing page URL |
| Offline Attribution | Cross-device or offline conversions | Pass pre-resolved identity tokens or hashed PII |
Click Attribution (Online)
When a user clicks an ad served through Scope3, we append a uniquesc3clid parameter to the landing page URL:
- Capture the
sc3clidfrom the URL when the user lands - Store it (cookie, session, or database)
- Include it as
user_match.click_idwithclick_id_type: "sc3clid"when sending conversion events
Offline Attribution (Cross-Device / Offline)
For conversions that happen on a different device or offline, use pre-resolved identity tokens or hashed identifiers. These allow Scope3 to match the conversion back to ad exposure even without a click ID. Use cases:- User sees ad on mobile, purchases on desktop
- User sees ad online, purchases in physical store
- CRM/offline sales data upload
Supported Identity Types
| Type | Description |
|---|---|
rampid | LiveRamp RampID (person-based) |
id5 | ID5 ID (device-based) |
uid2 | Unified ID 2.0 (person-based) |
euid | European Unified ID (person-based) |
pairid | Publisher Advertiser ID (device-based) |
maid | Mobile Advertising ID (device-based) |
hashed_email and hashed_phone:
- Must be SHA-256 hex strings (64 characters, lowercase)
- Emails: normalize to lowercase with whitespace trimmed before hashing
- Phone numbers: normalize to E.164 format (e.g.
+12065551234) before hashing
Test Events
Usetest_event_code to validate your integration without affecting production attribution or reporting:
Response Format
Success (200 OK)
| Field | Type | Description |
|---|---|---|
events_received | integer | Number of events received |
events_processed | integer | Number of events successfully queued |
match_quality | number | Overall match quality score (0.0–1.0) |
warnings | array | Non-fatal issues (e.g. low match quality, missing recommended fields) |
partial_failures | array | Per-event validation failures (see below) |
Partial Failures
Events within a batch are processed independently. Failed events are reported inpartial_failures without rejecting the entire batch:
Error Responses
Operation-level errors (auth failure, invalid event source) return anerrors array instead of the success fields:
| Error Code | Description | Resolution |
|---|---|---|
EVENT_SOURCE_NOT_FOUND | Event source not configured | Run sync_event_sources first |
INVALID_EVENT_TYPE | Unrecognized or disallowed event type | Check event source’s event_types configuration |
INVALID_EVENT_TIME | Event time too far in the past/future | Use timestamps within the seller’s attribution window |
MISSING_USER_MATCH | No user identifiers provided | Include at least one of: uids, hashed_email, hashed_phone, click_id, or client_ip + client_user_agent |
BATCH_TOO_LARGE | More than 10,000 events | Split into smaller batches |
RATE_LIMITED | Too many requests | Wait and retry with exponential backoff |
Code Examples
- cURL
- Python
- JavaScript
Best Practices
Configure Event Sources First
Configure Event Sources First
Always run
sync_event_sources before sending events. Events sent to
unconfigured sources are rejected with EVENT_SOURCE_NOT_FOUND.Always Capture Click ID
Always Capture Click ID
Store the
sc3clid parameter immediately when users land from ads. Use
cookies, session storage, or your database to persist it until conversion.Send Events Server-Side
Send Events Server-Side
Never expose your API key in client-side code. Always send conversion events
from your backend server.
Use Stable, Deterministic Event IDs
Use Stable, Deterministic Event IDs
Use order numbers, transaction IDs, or composite keys (e.g.
"purchase_user123_20260115") as event_id rather than random UUIDs. Events
are deduplicated by event_id + event_type + event_source_id, so stable
IDs ensure safe retries without duplicate counting.Send Multiple Identity Types
Send Multiple Identity Types
Provide as many user identifiers as available in
user_match (click ID,
hashed email, UIDs). More identifiers increases match rates across devices and
channels.Include Value and Currency
Include Value and Currency
For purchase events, always include
custom_data.value and
custom_data.currency to enable ROAS reporting and optimization.Use Accurate Event Times
Use Accurate Event Times
Set
event_time to when the event actually occurred, not when you’re sending
the request. Events outside the attribution window may not be matched.Batch When Possible
Batch When Possible
Send up to 10,000 events per request to reduce API calls. Events within a
batch are processed independently — a failure in one won’t affect others.
Test with test_event_code
Test with test_event_code
Set
test_event_code during integration to validate events without
affecting production 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.
Next Steps
sync_event_sources
Configure event sources before logging events
Outcomes Agents
Configure optimization agents to use your conversion data
Campaign Setup
Set up campaigns to optimize for conversions
Reporting
Analyze conversion performance across campaigns
Authentication
Learn more about API key management