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.

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.

Name

Type

Description

Value

entity

string

Required.

Type of entity.

content

name

string

Required.

Describes the type of conversion action.

bookmark

review

compare

cart

wishlist

like

upvote

download

order_confirm

payload

AddEventPayload

Required.

Payload dispatched with the event.

-

AddEventPayload

Payload dispatched with trackAddEvent.

Name

Type

Description

items

array< EntityPayload >

Required.

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.

ID of the entity

entityType

string

Required.

Name of the entity

url

string

URL of the entity page. Typically the detail page of the entity.

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.

Name

Type

Description

Value

entity

string

Required.

Type of entity.

content

name

string

Required.

The name of the conversion funnel from which the entity is removed and tracked by the event..

bookmark,

review

compare

wishlist

like

cart

payload

RemoveEventPayload

Required.

Payload dispatched with the event.

-

RemoveEventPayload

Payload dispatched with trackRemoveEvent.

Name

Type

Description

items

array< EntityPayload >

Required.

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.

ID of the entity

entityType

string

Required.

Name of the entity

url

string

URL of the entity page. Typically the detail page of the entity.

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.

Do you have some feedback for us?

If you have suggestions for improving this article,