Kiwi Sizing can technically be integrated on any E-commerce platform. We have listed specific guides for a handful of most common ones, but if you happen to be using one that is not specifically mentioned, then please read through this guide.
In order to use Kiwi Sizing to display size charts and recommenders on your store, you'll have to add our Javascript script on your product page HTML.
There are 2 main things to add:
Part 1: Add Kiwi Sizing JS
First thing you need to do is include the following script on your product page. You can add it right after the </body>
close tag.
<!-- KiwiSizing v1.0.0 Integration !--> <script> !function(t,n,s,e,i){function r(t){try{var s="; "+n.cookie,e=s.split("; "+t+"=");if(2==e.length)return e.pop().split(";").shift()}catch(i){}return null}t[i]=t[i]||{},t[i]._queue=[];const o="on setShopID setUserID setUserEmail setLanguage loadSizing".split(" ");for(var a=0;a<o.length;a++){const c=o[a];t[i][c]=function(){var n=Array.prototype.slice.call(arguments);return n.unshift(c),t[i]._queue.push(n),t[i]}}const l=r("_ks_scriptVersion")||t.ks_version||"";var u=n.createElement(s);n=n.getElementsByTagName(s)[0],u.async=1,void 0!==t.ks_load_async&&(u.async=t.ks_load_async),u.src=e+"?v="+l,u.id="ks-integration",n.parentNode.insertBefore(u,n)}(window,document,"script","https://cdn.static.kiwisizing.com/SizingPlugin.prod.js","ks"); </script> <!-- End KiwiSizing Integration !-->
Part 2. Load the script
After the script is added, a globalks
object becomes available on the page. You would need to call a few functions to properly load the size charts and recommenders on the product page.
Right after the script from part 1, add the following script...
<script> ks.setShopID("REPLACE_ME_KIWI_SIZING_SHOP_ID"); ks.loadSizing({ productData: PRODUCT_DATA, // (required) see below }); </script>
- Replace
REPLACE_ME_KIWI_SIZING_SHOP_ID
with the Shop ID of your KiwiSizing account (top right on the dashboard page). The ID looks something likeshop-97c5-043675f4d34c
productData is a javascript object that contain some basic product information. At the very least, you should pass in productID, title, and images. There are 2 ways to find those values:
You may need to use javascript/jQuery to retrieve those values from the product page HTML
If your e-commerce platform support template language, you may retrieve those using template variables
For more detailed options, see our developers page: https://developers.kiwisizing.com/docs/product-page-integration