Versioning
Klevu JS Library
The core Klevu JS Library is provided on the following URL
Note the V2 path will always track the latest 2.x version and be the most up-to-date.
If you prefer to lock to a specific version, you can optionally indicate the specific version within the path.
e.g.
If you opt to lock to a specific version, you will need to manually update your version from time to time to get the latest Klevu features and bug fixes.
Klevu Theme Versioning
The Klevu Theme follows the same versioning process as the core Klevu JS Library
Quick Search:
Search Results Landing Page:
Category/Collection Landing Pages:
Recommendations Widgets/Banners:
Klevu Template Resource Files
The following .tpl files are automatically pulled into the corresponding theme javascript during injection. They are listed here to be used as a non-minified reference.
Note: When viewing these in the browser, use view-source to see the templates raw markup
Quick Search:
Search Results Landing Page:
Category/Collection Landing Pages:
Debug / Development Versions
During your development you may find it easier to reference non-minified versions of the script libraries.
You can access the non-minified version of any core file by adding debug to the filename.
e.g.
Lazy-Load Versions
If you are using Google Pagespeed Insights or Lighthouse, you might find some Klevu scripts labeld as render-blocking. Klevu provides the option to lazy-load our theme scripts which will improve your lighthouse performance score, but there is more to consider.
With lazy-load enabled, the initial script sizes are tiny. These scripts then request more resources when required, which can slightly slow the display of products compared to when lazy-load is disabled, especially after the first-page load when none of the lazy-loaded scripts are cached.
We have included lazy-load file options so you may try both settings and determine which works best for your site.
You can access the lazy-load version of the following files by adding lazyload to the filename reference.
e.g.
It is not possible to have the https://js.klevu.com/core/v2/klevu.js to be lazyload.
It contains the main Klevu JS object which is used by other Klevu scripts to render the results. There is potential for conflicts with onpage objects expecting the Klevu core to be in place.
Magento users can find lazy-load selection options within the Magento Klevu admin interface.
Magento admin > Stores > Configuration > Klevu > Search Configuration > Developer Settings
See : The knowledgebase guide for Magento lazy-loading for more details.
.