Menu

Web Analytics

In your extended Shop settings, you’ll find the “Web analytics” option to help you analyse customer behaviour with analytics tools.

Connect your Google Analytics and Facebook Pixel with the input fields you will find there.

In the section “More tracking tools”, you can insert your own code to use tools from other providers such as hotjar or crazyegg, etc. You can even define your own tracking code.

You can track the following events:

Event Is triggered if a customer...
onUpdate ...changes the category (men, women, etc.) or moves from a list page to a detail page.
onAddToBasket ...puts an item in the basket.
onBasketChange ...makes changes in the basket (deletes items, changes quantity/size, redeems voucher).
onCheckoutStep ...gets a step closer to checkout (e.g. from address to payment options).
onOrderSuccess ...completes an order successfully.

This is how you integrate your code in the input field.

<script>
    window.sprdShop.onUpdate(function (data) { console.log(data); });
    window.sprdShop.onAddToBasket(function (item) { console.log(item); });
    window.sprdShop.onBasketChange(function (data) { console.log(data); });
    window.sprdShop.onCheckoutStep(function (data) { console.log(data); });
    window.sprdShop.onOrderSuccess(function (data) { console.log(data); });
</script>


This code will only issue objects in consoles so you can check whether everything works. Then replace console.log(data); with the code of the analytics tool you use so that it makes it into your shop and you can track visitor behaviour. The events onBasketChange, onOrderSuccess and onCheckoutStep will only be issued once the customer gets to the checkout.

Was this article helpful?