Skip to content

Widget Interaction

Tracks user interactions with Segmentify recommendation widgets using the INTERACTION event.

View as Markdown llms.txt

Tracks user interactions with Segmentify recommendation widgets using the INTERACTION event. These events are essential for measuring widget performance and feeding the recommendation engine with behavioral signals.

The instanceId field identifies which campaign or widget instance the user interacted with (use {campaignInstance}), and the type field specifies the nature of the interaction.

Requests:

  • Impression — fires when a recommendation widget enters the user’s viewport (type: "impression"). Should be sent as soon as the widget becomes visible, even if the user does not click.
  • Widget View — fires when a recommendation widget is fully rendered and displayed (type: "widget-view"). Distinct from an impression — use this to confirm the widget was actually shown.
  • Click — fires when a user clicks on a product within a recommendation widget (type: "click", interactionId: {productId}). This is the primary signal for measuring recommendation effectiveness.

All three requests require userId, sessionId, instanceId, lang, currency, and device. Optional fields include recommendIds, pageUrl, referrer, and email.

Example body

{
"name": "INTERACTION",
"userId": "1234567890123456789",
"sessionId": "9876543210987654321",
"testMode": "false",
"device": "PC",
"params": {},
"recommendIds": [],
"pageUrl": "",
"referrer": "",
"lang": "EN",
"currency": "EUR",
"region": "",
"type": "impression",
"instanceId": "scn_xxxx",
"email": "user@example.com"
}

Example body

{
"name": "INTERACTION",
"userId": "1234567890123456789",
"sessionId": "9876543210987654321",
"testMode": "false",
"device": "PC",
"params": {},
"recommendIds": [],
"pageUrl": "",
"referrer": "",
"lang": "EN",
"currency": "EUR",
"region": "",
"type": "widget-view",
"instanceId": "scn_xxxx",
"email": "user@example.com"
}

Example body

{
"name": "INTERACTION",
"userId": "1234567890123456789",
"sessionId": "9876543210987654321",
"testMode": "false",
"device": "PC",
"params": {},
"recommendIds": [],
"pageUrl": "",
"referrer": "",
"lang": "EN",
"currency": "EUR",
"region": "",
"type": "click",
"instanceId": "scn_xxxx",
"interactionId": "PRODUCT_ID",
"email": "user@example.com"
}