---
title: "Funnel events"
slug: "funnel-events"
abstract: "Describes the entity payload used for tracking interactions with an entity."
---
# Funnel events

Sitecore Search JS SDK for React offers the following funnel events that are dispatched when a visitor adds an item to their cart or wish list, completes an order, and so on.

Use the generic [trackAddEvent](https://doc.sitecore.com/search/en/developers/search-js-sdk-for-react/js-sdk-reference/events/funnel-events.html#UUID-88685583-0537-261a-44ce-a7b4ecae5c57_N1691595838083 "trackAddEvent") and trackRemoveEvent to track addition and removal of entities into and from any type of conversion funnel. Both events take an array of EntityPayload objects.

> [!note]
> All attributes are optional unless indicated otherwise.

## trackAddEvent

Tracks add to conversion funnel events. It is dispatched when the visitor adds an entity to the conversion funnel.

> [!note]
> Dispatch this event verbosely because the SDK cannot infer when this action is happening.

| Name | Type | Description | Value |
| --- | --- | --- | --- |
| `entity` | string | Required.<br><br>Type of entity. | `content` |
| `name` | string | Required.<br><br>Describes the type of conversion action. | `bookmark`<br><br>`review`<br><br>`compare`<br><br>`cart`<br><br>`wishlist`<br><br>`like`<br><br>`upvote`<br><br>`download`<br><br>`order_confirm` |
| `payload` | AddEventPayload | Required.<br><br>Payload dispatched with the event. | \-  |

### AddEventPayload

Payload dispatched with `trackAddEvent`.

| Name | Type | Description |
| --- | --- | --- |
| `items` | array< `EntityPayload` > | Required.<br><br>Array of payloads for entities |
| `actionSubtype` | string | *conversion* |
| `review` | ReviewEventModel |     |
| `customAttributes` | Record< string, any> | This object contains name value pairs of custom attributes. |

#### EntityPayload

This payload describes an entity. Use this payload type in all events when you want to track interaction with an entity.

| Name | Type | Description |
| --- | --- | --- |
| *id* | number | Required.<br><br>ID of the entity. |
| *entityType* | string | Required.<br><br>Name of the entity. |
| *url* | string | URL of the entity page. Typically the detail page of the entity.<br><br>When not supplied, the SDK uses the URL of the page. |
| *sourceId* | string | ID of the source of the entity, as assigned by the connector. |

#### ReviewEventModel

This payload describes a review.

| Name | Type | Description |
| --- | --- | --- |
| `id` | string | Required. |
| `rating` | number | Number value of the rating in the displayed range. |
| `comment` | string | The text entered by visitor in the comment field, if displayed. |

## trackRemoveEvent

Tracks remove from conversion funnel events. It is dispatched when the visitor removes an entity from the conversion funnel.

> [!note]
> Dispatch this event verbosely because the SDK cannot infer when this action is happening.

| Name | Type | Description | Value |
| --- | --- | --- | --- |
| `entity` | string | Required.<br><br>Type of entity. | `content` |
| `name` | string | Required.<br><br>The name of the conversion funnel from which the entity is removed and tracked by the event.. | `bookmark`,<br><br>`review`<br><br>`compare`<br><br>`wishlist`<br><br>`like`<br><br>`cart` |
| `payload` | `RemoveEventPayload` | Required.<br><br>Payload dispatched with the event. | \-  |

### RemoveEventPayload

Payload dispatched with `trackRemoveEvent`.

| Name | Type | Description |
| --- | --- | --- |
| `items` | array< `EntityPayload` > | Required.<br><br>Array of payloads for entities |
| `actionSubtype` | string | *conversion* |
| `review` | ReviewEventModel |     |

#### ReviewEventModel

This payload describes a review.

| Name | Type | Description |
| --- | --- | --- |
| `id` | string | Required. |
| `rating` | number | Number value of the rating in the displayed range. |
| `comment` | string | The text entered by visitor in the comment field, if displayed. |

#### EntityPayload

This payload describes an entity. Use this payload type in all events when you want to track interaction with an entity.

| Name | Type | Description |
| --- | --- | --- |
| *id* | number | Required.<br><br>ID of the entity. |
| *entityType* | string | Required.<br><br>Name of the entity. |
| *url* | string | URL of the entity page. Typically the detail page of the entity.<br><br>When not supplied, the SDK uses the URL of the page. |
| *sourceId* | string | ID of the source of the entity, as assigned by the connector. |