Funnel events
Sitecore Search JS Data package 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
and trackRemoveEvent
events to track the addition and removal of entities into and from any type of conversion funnel. Both events take an array of EntityPayload
objects.
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.
Name |
Type |
Description |
Value |
---|---|---|---|
|
string |
Required. Type of entity. |
|
|
string |
Required. Describes the type of conversion action. |
|
|
AddEventPayload |
Required. Payload dispatched with the event. |
- |
AddEventPayload
Payload dispatched with trackAddEvent
.
Name |
Type |
Description |
---|---|---|
|
array< |
Required. Array of payloads for entities |
|
string |
conversion |
|
ReviewEventModel | |
|
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 |
---|---|---|
|
number |
Required. ID of the entity |
|
string |
Required. Name of the entity |
|
string |
URL of the entity page. Typically the detail page of the entity. When not supplied, the SDK uses the URL of the page. |
|
string |
ID of the source of the entity, as assigned by the connector. |
ReviewEventModel
This payload describes a review.
Name |
Type |
Description |
---|---|---|
|
string |
Required. |
|
number |
Number value of the rating in the displayed range. |
|
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.
Name |
Type |
Description |
Value |
---|---|---|---|
|
string |
Required. Type of entity. |
|
|
string |
Required. The name of the conversion funnel from which the entity is removed and tracked by the event.. |
|
|
|
Required. Payload dispatched with the event. |
- |
RemoveEventPayload
Payload dispatched with trackRemoveEvent
.
Name |
Type |
Description |
---|---|---|
|
array< |
Required. Array of payloads for entities |
|
string |
conversion |
|
ReviewEventModel |
ReviewEventModel
This payload describes a review.
Name |
Type |
Description |
---|---|---|
|
string |
Required. |
|
number |
Number value of the rating in the displayed range. |
|
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 |
---|---|---|
|
number |
Required. ID of the entity |
|
string |
Required. Name of the entity |
|
string |
URL of the entity page. Typically the detail page of the entity. When not supplied, the SDK uses the URL of the page. |
|
string |
ID of the source of the entity, as assigned by the connector. |