promotion.viewed
The promotion is on screen: the popup opened, or half of a marked element is visible.
CODE
next.on('promotion.viewed', (data, event) => {});Data
Present: always; optional when it may be missing; campaign once the campaign is loaded; priced once the server priced the cart.
| Field | Type | Present | |
|---|---|---|---|
id | string | always | exitIntent({ id }) or data-next-promotion; exit_intent for the exit-intent popup by default. |
type | "exit_intent" | "banner" | always | exit_intent for the exit-intent popup, banner for a marked element. |
name | string | optional | exitIntent({ name }) or data-next-promotion-name, when set. |
creative | string | optional | The popup's template name or image URL, or data-next-promotion-creative. |
Example
The second argument, with data inside. See Events for the envelope's fields.
CODE
{
"event_id": "3f2b8c1d9e7a4b6c8d5e2f1a0b9c8d7e",
"event_type": "promotion.viewed",
"object": "promotion",
"data": {
"id": "exit-offer",
"type": "exit_intent",
"name": "Exit offer",
"creative": "exit-offer"
},
"created_at": "2026-11-04T08:30:00.000Z",
"session_id": "0b8f3c2d1e4a4f6b9c7d5e3f2a1b0c9d",
"sdk_version": "0.5.0"
}