Integration into your eCommerce platform will allow Beacon to track conversion and allow a better understanding of your marketing ROI.
This a technical implementation, as eCommerce systems vary in implementation. We recommend you seek the support of a Web Developer / Javascript Programmer if you’re unsure on how to implement the following information.
Beacon takes no responsibility for any errors on your site due to incorrect implementation.
Beacon provides Javascript API’s to your website which allows you to send notification of an eCommerce event being triggered such as “checkout” or “add to basket”.
We provide five eCommerce Notifications via our API; below is a technical outline of how and when these Notifications should be triggered.
window.bwai.addToBasket(evt, itm, cost, quantity);
This method notifies Beacon that a user has added one or more of an item to their basket. It takes four arguments:
document.querySelector(".addtobasket").addEventListener("click", (e) => {
window.bwai.addToBasket(e, 1, 10.99, 1);
});
window.bwai.rmFromBasket(evt, itm, cost, quantity);
This method notifies Beacon that a user has removed one or more of an item to their basket. It takes four arguments:
window.bwai.checkoutTriggered(evt, totalCost, items, shipping);
This method notifies Beacon you’re sending the user to a payment gateway system (on or off your site). It takes four arguments:
window.bwai.checkoutSuccess();
This method notifies Beacon that the payment was successful and the order has completed.
window.bwai.checkoutFailed();
This method notifies Beacon that the payment failed and the order has not been completed yet.
If you have any questions about implementing Beacon eCommerce tracking on your website, please contact a member of our Support team.