Norce Installation Guide

Norce Installation Guide

  • updated 1 yr ago

Install the Hello Retail partner JavaScript

For Hello Retail to work on your Norce webshop, you'll have to add the partner JavaScript. Please follow these simple steps to do this.

Step 1: Log in to your Norce admin panel

Step 2: Navigate to Inställningar > Scripthantering and click edit on ”All pages”. 

 

Step 3: Tick the box Inkludera skript för bodytaggen and copy/paste your Hello Retail partner JavaScript and a cart tracking snippet into the Script i bodytaggen field:

<script async src="https://helloretailcdn.com/helloretail.js"></script>
<script>
    hrq = window.hrq || [];
    hrq.push(['init', {}]);
    hrq.push(function(sdk){
        try {
            var cartId = getCookie("JetShop_CartID");
            if (cartId) {
                fetch("/Services/Rest/v2/json/shoppingcart/" + cartId)
                    .then((response) => response.json())
                    .then((data) => {
                        var productNumbers = [];
                        var cart = data[0];
                        for (i = 0; i < cart.ProductsCart.length; i++) {
                            productNumbers.push(cart.ProductsCart[i].Articlenumber);
                        }
                        sdk.setCart({
                            total: cart.TotalProductSum,
                            url: document.location.protocol + "//" + document.location.hostname + "/externalcheckout.aspx?cartid=" + cart.CartId,
                            productNumbers: productNumbers
                        });
                    });
            }
        } catch(e) {
            console.log(e);
        }
    });
</script>


 

Remember to Save your changes.


Install the conversion tracking script 

In order for Hello Retail to generate accurate product recommendations to your visitors, it’s important that we have the conversion data available.

This will also allow Hello Retail to generate statistics and analytics on how the personalisation of your webshop are performing.

While still in the Scripthantering section, follow the same steps as above, but this time select the order confirmation page and add the following script to the body section:

<!-- Hello Retail conversion tracking -->
<script>
    const orderIdForOrder = dataLayer[0].transactionId;
    const transactionValueForOrder = parseFloat((dataLayer[0].transactionValue).replace(',', '.')).toFixed(2) - parseFloat(dataLayer[0].transactionShipping).toFixed(2);
    const productNumbers = dataLayer[0].transactionProducts.map(item => item.sku)
    const customerEmailForOrder = JetshopData.Order.Customer.Email;

    hrq = window.hrq || [];
    hrq.push(["trackConversion", {
        total: parseFloat(transactionValueForOrder).toFixed(2),
        orderNumber: orderIdForOrder,
        productNumbers: productNumbers,
        email: customerEmailForOrder
    }]);
</script>
<!-- End Hello Retail conversion tracking -->

Remember to Save your changes.


Create a blank page for search results

This section is for the legacy platform, Responsive Base. For Jetshop Flight, consult with our support team. The following section is only relevant for setups for a full search.

Step 1: Log in to your Norce admin panel

Step 2: Navigate to Sidor > Lista sidor:

 

Step 3: Choose to Add new page (”Skapa ny sida"):

 

Step 4: Provide a name for this new page, e.g. call it Search results or Sökresultat:
Also set a headline (”Huvudrubrik”) and a title. To be able to save the page, it also needs some content (”Innehåll”). This will be removed by our script when we insert the search results, so you can just add anything. For example ”Laddar sökresultat...”, or just a dot.

 

Step 5: Click the link icon  to show the page url, and copy it.

Step 6: Remember to Save ("Spara")

Step 7: Finally, share this new page url with Hello Retail – for Hello Retail to finalize the setup of dynamic search.


Configure Webshop

After the installation setup of your platform and the onboarding flow, make sure to have your webshop configured. Read this guide here on how to do so:

Configure Webshop

Like Follow
  • 1 yr agoLast active
  • 1092Views
  • 1 Following