Product events
Product views recorded by the tracking script.
product.viewed
Sent each time the tracking script’s product command records a product view. Views come from known contacts and from anonymous visitors. When an anonymous visitor is identified later, their earlier views count for the contact, but the events already sent keep contact_id set to null. See Commerce.
Product views come from site traffic, so webhooks that receive All events don’t get this event. Subscribe to product.viewed by name.
Webhook requests carry a JSON array of events like this one; see Webhook requests.
Fields
event_idstringEvent ID (evt_…). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with Retrieve an event.
typestringAlways product.viewed.
objectobjectThe product view the event describes. Its fields are listed below.
data.objectobjectThe same object again, in the shape that the Events API returns in data.
Product view object
objectstringAlways product_view.
productobjectThe viewed product: id (prd_…, null when the product isn’t in your catalog), external_id (the product ID in your shop), title, url, image_url, price and currency. Values come from your catalog when the product is in it, and from the product call otherwise.
contact_idstring | nullThe contact who viewed the product (con_…), or null for an anonymous visitor.
emailstring | nullThe contact’s email address, or null for an anonymous visitor.
anonymous_idstring | nullThe tracking script’s ID for the visitor’s browser.
viewed_atstringWhen the visitor viewed the product, in ISO 8601 UTC.
sourcestringAlways js (the tracking script).
contextobject | nullWhat the script knows about the visit: page (url, path, title, referrer), campaign (UTM values), locale, timezone, library and user_agent. The same fields as on events from the tracking script.
{
"event_id": "evt_3xbB2QmL7cVn0Rk8sWd4TfY1uHa",
"type": "product.viewed",
"object": {
"object": "product_view",
"product": {
"id": "prd_3Rx6aB1cD2eF3gH4iJ5kL6mN7oP",
"external_id": "8123456789",
"title": "Trail running shoe",
"url": "https://shop.example.com/products/trail-running-shoe",
"image_url": "https://shop.example.com/images/trail-running-shoe.jpg",
"price": 89,
"currency": "USD"
},
"contact_id": "con_3EwrXnu9OaQWlfI1AyPUUEoYjQs",
"email": "ada@example.com",
"anonymous_id": "anon_5f0c9e2b7d1a4c8e9b3f6a2d1c0e7b4a",
"viewed_at": "2026-10-19T09:12:40.512Z",
"source": "js",
"context": {
"page": {
"url": "https://shop.example.com/products/trail-running-shoe",
"path": "/products/trail-running-shoe",
"title": "Trail running shoe"
},
"campaign": { "source": "emailit", "medium": "email", "name": "Autumn sale" },
"timezone": "Europe/Prague"
}
},
"data": {
"object": {
"object": "product_view",
"product": {
"id": "prd_3Rx6aB1cD2eF3gH4iJ5kL6mN7oP",
"external_id": "8123456789",
"title": "Trail running shoe",
"url": "https://shop.example.com/products/trail-running-shoe",
"image_url": "https://shop.example.com/images/trail-running-shoe.jpg",
"price": 89,
"currency": "USD"
},
"contact_id": "con_3EwrXnu9OaQWlfI1AyPUUEoYjQs",
"email": "ada@example.com",
"anonymous_id": "anon_5f0c9e2b7d1a4c8e9b3f6a2d1c0e7b4a",
"viewed_at": "2026-10-19T09:12:40.512Z",
"source": "js",
"context": {
"page": {
"url": "https://shop.example.com/products/trail-running-shoe",
"path": "/products/trail-running-shoe",
"title": "Trail running shoe"
},
"campaign": { "source": "emailit", "medium": "email", "name": "Autumn sale" },
"timezone": "Europe/Prague"
}
}
}
}