Skip to main content
<script src="https://sdk.smile.io/smile-js/v1/smile.js"></script>
If you’re using one of Smile’s pre-built integrations (such as the Shopify or BigCommerce app), then the SDK 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 SDK script tag on each page where you want access to SDK functionality. There are two ways to include the SDK:
  1. By adding a script tag — Load the SDK directly from our CDN using a <script> tag.
  2. By importing the npm package — Install and use the loadSmile() method to dynamically load the latest SDK from our CDN.
Once you’ve included Smile.js, you’ll need to initialize the SDK before you can use it.

Versioning

Refer to our versioning guide to learn how versioning works with each of these approaches and when you need to update your integration.

Good to know

The script should always be loaded directly from Smile’s CDN rather than included in a bundle or hosted yourself.