Send custom events to the alby widget to enhance analytics and shopper experience
Supplemental events allow additional data to be sent to alby in order to enhance its functionality and integration with the client's application.
Prerequisites
- It is required that alby is installed on the page that these events are fired. Visit here to ensure that you have installed alby before continuing.
Events
The following is a list of possible custom events that are tracked with alby.
LOAD_PDP
- Description: Trigger when a user has landed on a product description page.
window.albyTrack = window.albyTrack || [];
window.albyTrack.push({
event: "LOAD_PDP",
payload: {
productId: 'abc123', // Product ID of the item
variantId: '678xyz' // (Optional) ID of specific variant for a given Product
}
});
ADD_TO_CART
- Description: Trigger when a user has added a product to cart.
window.albyTrack = window.albyTrack || [];
window.albyTrack.push({
event: "ADD_TO_CART",
payload: {
price: 19.99, // Price of the item
variantId: '678xyz', // ID of specific variant for a given Product
quantity: 1, // Quantity of the item
currency: "USD" // Currency
}
});