Clicks vs. conversions
| Event type | What it measures | Example |
|---|---|---|
| Click | User viewed or opened a search result | User clicks on a product in search results |
| Conversion | User completed a meaningful action | User adds that product to their cart or completes a purchase |
Define your conversions
Before implementing tracking, decide what actions count as conversions for your use case:| Application type | Typical conversion |
|---|---|
| E-commerce | Adding to cart, completing a purchase |
| Content platform | Reading an article, subscribing |
| Documentation site | Copying a code sample, following a tutorial |
| Job board | Applying to a job listing |
| SaaS product | Starting a free trial, upgrading a plan |
Send a conversion event
When a user completes a conversion action, send aconversion event to the POST /events endpoint:
Required and recommended fields
| Field | Required | Description |
|---|---|---|
eventType | Yes | Must be "conversion" |
eventName | Yes | A descriptive label, such as "Product Added To Cart" |
indexUid | Yes | The index containing the converted document |
userId | Yes | An arbitrary string identifying the user |
objectId | Recommended | The primary key of the converted document |
queryUid | Recommended | The UID of the original search query |
objectName | Optional | A human-readable description of the document |
queryUid links the conversion back to the original search request. You can find it in the metadata field present in search query responses.
It is not possible to associate multiple
conversion events with the same query. If a user converts on the same query twice, only the first event is recorded.When to fire conversion events
Conversion events should be sent at the moment the user completes the action, not when they first view the result. In a typical e-commerce flow:- User searches for “wireless headphones” (search request)
- User clicks on a product (click event)
- User reads the product page (no event)
- User adds the product to their cart (conversion event)
Best practices
- Track the most meaningful action. If you track too many conversion types, the conversion rate metric becomes less useful. Focus on the action that best represents search success.
- Preserve the
queryUidacross pages. Store it in session storage or pass it as a URL parameter so you can associate conversions with the search that led to them. - Use consistent user IDs. The same user should have the same
userIdacross all searches and events. - Do not send duplicate conversions. Only one conversion event per query is recorded, so avoid sending the same event multiple times.
Next steps
Getting started with analytics
Set up click and conversion tracking from scratch
Events endpoint reference
Full reference for the
/events endpoint fields and behaviorTrack click events
Record which search results users click on
Bind events to a user
Learn how to associate analytics events with specific users