Lightspeed Installation Guide

Lightspeed Installation Guide

Inserting the Hello Retail script + cart tracking

Log in to your lightspeed back office and navigate to SettingsWeb extras

Insert the script in the "CUSTOM JS" section:

The script should be:

(Be aware, that you need to replace "YOUR_PARTNER_ID" with your own partner ID. See below the script)

<script type="text/javascript">
(function() {
    var aws = document.createElement('script');
    aws.type = 'text/javascript';
    if (typeof(aws.async) != "undefined") { aws.async = true; }
    aws.src = '';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(aws, s);

_awev=(window._awev||[]);_awev.push(["bind_once", "crawl_completed", function() {
    try {
        var base_url = window.location.origin + "/";
        if (window.location.pathname.startsWith("/" + document.documentElement.lang +"/")){
            base_url += document.documentElement.lang + "/";
        ADDWISH_PARTNER_NS.$.get((base_url + 'cart?format=json'), function(data){
            var product_urls = [];
            var product_numbers = [];
            var cart_total = 0;
            var cart = data.cart;
            if (cart) {
                ADDWISH_PARTNER_NS.$.each(cart.products, function(index, product){
                    product_urls.push(base_url + product.url);
                cart_total = parseFloat(cart.totals.grand_total);
                total: cart_total,
                url: window.location.origin + '/cart',
                urls: product_urls,
                productNumbers: product_numbers
    } catch(e) {
        ADDWISH_PARTNER_NS.log("Could not set cart", e);

Important: Once you have pasted it you must replace YOUR_PARTNER_ID with your own Hello Retail id. You can find this by logging into your account — see more here. You should also enable the custom JavaScript using the status toggle.

Inserting the Hello Retail conversion tracking

While still in the SettingsWeb extras, Insert the conversion tracking in the "TRACKING" section.

The conversion tracking script should be

_awev=(window._awev||[]);_awev.push(["bind_once", "crawl_completed", function() {
    var product_numbers = [];
    {% for product in order.products %}
        product_numbers.push('{{ product.product_id }}');
    {% endfor %}
        total: {{ order.information.price_incl }},
        orderNumber: '{{ order.information.number }}',
        email: '{{ }}',
        productNumbers: product_numbers

Remember to save your changes


Make your data available to Hello Retail

Our new API based feeds for products, categories and orders are easy to get up and running - all you need is to get an API key + API secret from your Lightspeed representative.

If you are a new customer you will be prompted to insert the API credentials in the onboarding flow when creating your webshop:


However, If you are an existing customer you will have to give these to our customer support department.

Notice: API access is not possible if you are on the cheapest lightspeed package - If this is the case then you need to contact your sales representative at Lightspeed.

  • 4 mths agoLast active
  • 626Views
  • 1 Following