Log an attribution event
Request parameters
string
required
The event type. See the event types table below for valid values.
string
required
Your store domain. Example:
"yourstore.com"string
required
A session identifier from your system — typically your checkout ID or order ID.
string
required
The protocol that initiated the session:
"ucp" or "acp".string
The specific AI surface that triggered this event, if known. Examples:
"google_ai_mode", "chatgpt", "perplexity".object
Additional event data. Common fields:
product_id— the product involvedvariant_id— the specific variant selectedvalue— order value in smallest currency unit (cents or paise)currency— ISO 4217 currency code
string
ISO 8601 timestamp. Defaults to the current time if omitted.
Event types
Example request:
Response fields
string
Unique identifier for this logged event.
string
Confirmation that the event was recorded. Value is always
"recorded" on success.boolean
Whether Asva was able to classify the session to a specific AI surface.
string
The AI surface Asva attributed this session to, based on your
ai_surface field and its own signal analysis.number
Attribution confidence score from 0 to 1. Values above 0.8 are high-confidence classifications.
Integration examples
Add attribution logging to your UCP and ACP checkout handlers. Always fire asynchronously — do notawait the Asva call:
Pull attribution data
Query parameters
string
required
Domain to query. Example:
"yourstore.com"string
required
Start date in ISO 8601 date format. Example:
"2026-03-01"string
required
End date in ISO 8601 date format. Example:
"2026-04-01"string
Time granularity for the
daily array: "day" (default), "week", or "month".Response fields
string
The domain queried.
object
The date range of the report, with
start and end fields.object
Aggregated metrics for the full period.
integer
Total sessions attributed to an AI surface.
integer
Total checkout sessions initiated from an AI surface.
integer
Total orders completed from an AI surface.
integer
Total revenue from AI-attributed orders, in smallest currency unit.
number
Orders divided by sessions, as a decimal.
0.131 = 13.1%.integer
Average order value from AI-attributed orders, in smallest currency unit.
object
Sessions and orders broken down by AI surface. Keys include
google_ai_mode, chatgpt, perplexity, and other_ai.array
Day-by-day (or week/month) breakdown with
date, sessions, checkouts, orders, and revenue_cents per period.Code examples
Related
- Dark Traffic Detection — how Asva identifies AI sessions
- GA4 Integration — connect attribution data to your GA4 reports
- Attribution Model — how confidence scoring works