How to setup IntelliSuggest Recommendation Widgets
Note: Users must be subscribed to the IntelliSuggest Recommendation service in order to use.
This article describes the process for setting up IntelliSuggest™ product recommendations.
Be sure to replace the placeholder examples with the appropriate values (e.g., "YOUR_SITE_ID")
Your SearchSpring Account Site ID may be found under "My Account" in the top right of the SearchSpring Management Console.
Product Page
Step #1 - Place the <div> containing
the product suggestions:
<!-- Begin Recommendations -->
<div class="intellisuggest" name="Product Recommendations"></div>
<!-- End Recommendations -->
Step #2 - Include the IntelliSuggest JavaScript:
Placing the script just before the closing
</body> tag works best for user
experience/performance.
The SKU argument to the viewItem() should be the unique SKU or product code for that item.
<script type="text/javascript">
document.write(unescape("%3Cscript src='" + ('https:' == document.location.protocol ? 'https:' : 'http:') + "//www.intellisuggest.com/is.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var product_code = "YOUR_PRODUCT_SKU";
IntelliSuggest.init({siteId:'YOUR_SITE_ID', context:'Product/' + product_code, seed:product_code});
IntelliSuggest.viewItem({sku:product_code});
} catch(err) {}
</script>
Basket Page
Step #1 - Place the <div> containing
the product suggestions:
<!-- Begin Recommendations -->
<div class="intellisuggest" name="Basket Recommendations"></div>
<!-- End Recommendations -->
Step #2 - Include the IntelliSuggest JavaScript:
Placing the script just before the closing
</body> tag works best for user
experience/performance.
One or more haveItem() calls are allowed. Include a haveItem() call for each item the shopper currently has in their basket. Don't worry about figuring out what they have most recently added or removed - always include all of the items currently in the basket.
<script type="text/javascript">
document.write(unescape("%3Cscript src='" + ('https:' == document.location.protocol ? 'https:' : 'http:') + "//www.intellisuggest.com/is.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
IntelliSuggest.init({siteId:'YOUR_SITE_ID', context:'Basket', seed:'ABC123 1000C 8ZYX300'});
IntelliSuggest.haveItem({sku:"ABC123", qty:"1", price:"107.95"});
IntelliSuggest.haveItem({sku:"1000C", qty:"1", price:"20.00"});
IntelliSuggest.haveItem({sku:"8ZYX300", qty:"1", price:"7.63"});
IntelliSuggest.inBasket();
} catch(err) {}
</script>
Order Confirmation Page
Step #1 - Include the IntelliSuggest JavaScript:
Placing the script just before the closing
</body> tag works best for user
experience/performance.
Step #2 - Make the appropriate JavaScript API calls:
The inSale() information arugments are all optional.
<script type="text/javascript">
document.write(unescape("%3Cscript src='" + ('https:' == document.location.protocol ? 'https:' : 'http:') + "//www.intellisuggest.com/is.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
IntelliSuggest.init({siteId:"YOUR_SITE_ID"});
IntelliSuggest.haveItem({sku:"10-GRB7", qty:"3", price:"5.00"});
IntelliSuggest.haveItem({sku:"400XYZ", qty:"1", price:"10.00"});
IntelliSuggest.inSale({
orderId:"1234", // The Order ID (optional)
total:"30.00", // The total order amount (optional)
city:"Los Angeles", // Customer"s shipping address City (optional)
state:"CA", // Customer"s shipping address State (optional)
country:"US" // Customer"s shipping address 2-letter Country Code (optional)
});
} catch (e) {}
</script>