Recommended events
Any lower_snake_case name works. Using these names and shapes keeps data consistent across clients and lets future reports and recommendations work without configuration.
Items: anything a user can view, watch or buy. Always send item_id, and send
item_type when a site has more than one kind of item. Recommendations depend on it.
Content and commerce
Section titled “Content and commerce”| Event | Properties | Notes |
|---|---|---|
page_view |
(automatic context) | Sent automatically with autoPageviews: true |
item_viewed |
item_id, item_type |
Detail page or player opened |
item_clicked |
item_id, rail_id?, position? |
Click from a list/rail |
add_to_cart |
item_id, price, currency, quantity |
|
purchase |
order_id, value, currency, items: [{item_id, price, quantity}] |
Send from your backend with the secret key: browser events can be blocked or forged |
Search
Section titled “Search”| Event | Properties |
|---|---|
search_performed |
search_id, query, result_count, page? |
search_result_clicked |
search_id, position (1-based), result_id |
With the npm SDK, track() returns the event id, which you can use as search_id. With the
loader snippet, generate your own id. Search queries are free text and get PII-scrubbed.
| Event | Properties | Notes |
|---|---|---|
video_started |
item_id, play_session_id, duration_s |
|
video_progress |
item_id, play_session_id, seconds_watched |
Heartbeat every 10–15 s while playing; seconds_watched is the time actually played since the last heartbeat (not the playhead) |
video_milestone |
item_id, play_session_id, pct (25/50/75/100) |
|
video_completed |
item_id, play_session_id |
A trackVideo() plugin will automate these later.
Experiments
Section titled “Experiments”cosembra.track('experiment_exposure', { experiment: 'checkout_v2', variant: 'B' })cosembra.register({ 'exp.checkout_v2': 'B' }) // attached to every later eventRecommendation rails (future)
Section titled “Recommendation rails (future)”| Event | Properties |
|---|---|
rail_shown |
rail_id, rail_type, item_ids: [...] |
rail_item_clicked |
rail_id, item_id, position |
Don't send
Section titled “Don't send”Emails, names, phone numbers, addresses, card or bank details, passwords, tokens, or health, religion, sexuality or political data. The server scrubs common patterns as a safety net. It is not a reason to send them.