Skip to main content
JavaScript
<script async src="https://js.smile.io/v1/smile-ui.js"></script>
If you’re using one of Smile’s pre-built integrations (such as the Shopify or BigCommerce app), then Smile.js is already included and initialized on your site. If you’re using a custom frontend, custom checkout, or want to make use of Smile functionality elsewhere, you need to manually include the Smile.js script tag on each page where you want access to SDK functionality. Good to know:
  • The script should always be loaded directly from Smile’s CDN rather than included in a bundle or hosted yourself.
  • Currently, Smile.js is always bundled with Smile UI, which provides a pop-up rewards experience for your customers. Including and initializing the script on a page will automatically result in the rewards launcher & panel being displayed.
  • To make use of the objects, methods, and functionality provided by Smile.js, you’ll need to enable the Javascript SDK setting for your account in Smile Admin.