Feedback

To refine recommendations and show the best items for each user, BOON records anonymous usage feedback data about how each user interacts with their recommendations. To enable this, it is important to track the various feedback events that may occur.

Feedback Types

Feedback events are divided into two main types; Item Feedback and Session Feedback.

Item Feedback

Item feedback events correspond directly to one or more items. For example, when the user adds an item to their basket or shares an individual item link.

The following feedback events are supported for item feedback:

Event

Description

expand-details

User expanded the item’s details container

view-details

User views the item’s details page or element

favorite

User added the item to their ‘favorite’ or ‘wish-list’

unfavorite

User removed the item from their ‘favorite’ or ‘wish-list’

share

User shared the item via a link or social media

rate-good

User rated the item positively

rate-average

User rated the item averagely

rate-bad

User rated the item badly

basket-add

User added the item to their basket

basket-remove

User removed the item from their basket

purchase

User purchased the item

Session Feedback

Session feedback events correspond to the session as a whole - no items are directly associated. Examples include the user sharing a link to their recommendations, or providing overall feedback about their experience.

The following feedback events are supported for session feedback:

Event

Description

share

User shared the sesssion via a link or social media

rate-good

User rated the session positively

rate-average

User rated the session averagely

rate-bad

User rated the session badly

Collecting Feedback

To collect feedback events, use the global boon() function, with the ‘feedback’ method. This is available on any page where the BOON JS tag is included.

Feedback events are collected by using the :

boon('feedback', feedbackType[, itemIdArray])
Arguments
  • feedbackEvent (string) – Name of the feedback event being recorded

  • itemIdArray (string[]) – Optional array of item IDs which feedback corresponds to. If provided, the event call is interpreted as Item Feedback - otherwise it is interpreted as Session Feedback.

Warning

Event calls are only tracked once the BOON tag has fully loaded. To ensure that feedback tracks successfully, event calls should only be triggered when the boonload JS event fires, by using an event listener. Examples of how to do this are shown below.

Note

Feedback events will only be tracked if the user has previously generated recommendations during their session. Any event calls made when the user has not will be ignored.

To track a purchase Item Feedback event with the item IDs p-1234 and p-8341, the following HTML would be valid:

<script>
    document.addEventListener("boonload", function(e) {
        boon('feedback', 'purchase', ['p-1234', 'p-8341']);
    });
</script>

Because the itemIdArray argument was specified, the call is interpreted as item feedback.

To track a rate-good Session Feedback event, the following call with no itemIdArray argument would be correct:

<script>
    document.addEventListener("boonload", function(e) {
        boon('feedback', 'rate-good');
    });
</script>