promotion.closed

The popup closed; once for each promotion.viewed of a popup, unless the page removed it.

CODE
next.on('promotion.closed', (data, event) => {});

Data

Present: always; optional when it may be missing; campaign once the campaign is loaded; priced once the server priced the cart.

FieldTypePresent
idstringalwaysexitIntent({ id }) or data-next-promotion; exit_intent for the exit-intent popup by default.
type"exit_intent" | "banner"alwaysexit_intent for the exit-intent popup, banner for a marked element.
namestringoptionalexitIntent({ name }) or data-next-promotion-name, when set.
creativestringoptionalThe popup's template name or image URL, or data-next-promotion-creative.
reason"clicked" | "dismissed" | "close_button"alwaysclicked: after promotion.clicked. dismissed: Esc or the overlay. close_button: the × button.

Example

The second argument, with data inside. See Events for the envelope's fields.

CODE
{
  "event_id": "3f2b8c1d9e7a4b6c8d5e2f1a0b9c8d7e",
  "event_type": "promotion.closed",
  "object": "promotion",
  "data": {
    "id": "exit-offer",
    "type": "exit_intent",
    "name": "Exit offer",
    "creative": "exit-offer",
    "reason": "clicked"
  },
  "created_at": "2026-11-04T08:30:00.000Z",
  "session_id": "0b8f3c2d1e4a4f6b9c7d5e3f2a1b0c9d",
  "sdk_version": "0.5.0"
}