SureBright

SDK Installation

Add the SureBright script to a custom storefront so the protection widget can show up.

If your store runs on Shopify, Magento, or Salesforce Commerce Cloud, our app adds the SureBright script for you and there is nothing to do here.

If you built your own storefront — Hydrogen, Next.js, or any custom front end — someone on your team needs to add the script once:

Script URLtext
https://cdn.surebright.com/sbsimxsdk.js

Add it to the <head> of your storefront, in the place that applies to every page, so it loads on product, cart, and checkout pages. Keep the id as sbsimxsdk, and add it only once per page.

There are two ways to do it. Either one is fine.

Option 1: Add the Script Tag#

Paste this into the <head> of your storefront:

Static injectionhtml
<script
  id="sbsimxsdk"
  type="text/javascript"
  async
  src="https://cdn.surebright.com/sbsimxsdk.js">
</script>

Option 2: Add the Script with JavaScript#

Or add it to the <head> from your own code:

Dynamic injectionhtml
<script>
(function () {
  var sb = document.createElement("script");
  sb.type = "text/javascript";
  sb.id = "sbsimxsdk";
  sb.src = "https://cdn.surebright.com/sbsimxsdk.js";
  document.head.appendChild(sb);
})();
</script>

After You Add It#

To confirm it is live, open a product page and check that sbsimxsdk.js loads in your browser's Network tab.

That is all the code you need. There is nothing to configure and no keys to add — we turn the integration on for your store from our side.

Once the script is on your storefront, let the SureBright team know. We finish and test the integration, then enable it for your store.

If you also want your own code to react when a shopper adds or removes a protection plan, see JavaScript Injection.