# Widget Interaction

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

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`.

## Impression

**Example body**

```json
{
  "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"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **Widget Interaction / Impression** in the request body examples of *Send events*.
:::


## Widget View

**Example body**

```json
{
  "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"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **Widget Interaction / Widget View** in the request body examples of *Send events*.
:::


## Click

**Example body**

```json
{
  "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"
}
```

:::tip[Try it]
Send this request from the [Events API reference](/reference/events/): pick **Widget Interaction / Click** in the request body examples of *Send events*.
:::
