Performance optimization of Hello Retail

Performance optimization of Hello Retail

While we continuously work on improving the speed for which your recommendation boxes and search are shown, there are a few smaller tweaks you can do. Below is described a few of those tweaks.

1. Load the script with fast_load = true

By default, the Hello Retail JavaScript is waiting for the entire document to be loaded before any actions are executed. This is to ensure that all the elements on your page, that is in some way affected by Hello Retail, is loaded before attempting to manipulate them.

We, however, have the option to begin loading the Hello Retail script before the whole website is loaded. This can sometimes improve the performance, if the rest of the website loads a bit slow due to e.g. other 3rd party scripts. It, however, requires the HTML-elements to be loaded before you get to the Hello Retail-script.

To enable the functionality do the following:

1) Ensure that the Hello Retail script is loaded at the end of the body tag.

2) Append the fast_load=true parameter to the script. This means that the script would look something similar to:

<script type="text/javascript">

(function() {
 var aws = document.createElement('script');
 aws.type = 'text/javascript';
 if (typeof(aws.async) != "undefined") { aws.async = true; }
 aws.src = (window.location.protocol == 'https:' ? 'https://d1pna5l3xsntoj.cloudfront.net' : 'http://cdn.addwish.com') + '/scripts/company/awAddGift.js#YOUR_PARTNER_ID,fast_load=true';
 var s = document.getElementsByTagName('script')[0];
 s.parentNode.insertBefore(aws, s);
 })();
</script>

Note: If you are using one of our native platform extensions or plugins (like Magento, WooCommerce or PrestaShop), please contact Hello Retail support for more info.

 

2. Optimize HTML-elements for recommendation boxes

There are two ways to insert recommendation, either by Hello Retail connecting to an existing HTML-tag, or by inserting our Div (preferred). You can sometimes get a bit of a speed improvement if you insert our Div tag instead of us using our selectors to find your recommendation boxes. To find the Div to insert, simply log into the Hello Retail backend and go to the specific recommendation box and look under Placement Settings:

 

 

If you are using our selectors and haven't inserted the Divs before, then contact our support to get our assistance with this. 

 

3. Loading fewer recommendation product items

If you are using our slider, Hello Retail will load additional products. The few products we have to load, the faster the recommendation box will be loaded. If you want to have the number of products in your recommendation boxes set to a lower number, then reach out to us and we can assist you.

  • 4 mths agoLast active
  • 104Views
  • 1 Following