Skip to main content
All recipes

Browser

CodeBrowserIIFE

Once you have access to the browser SDK bundle, host it on your own site and add the script below. It instruments window.fetch; use exact request hostnames in the data-services allowlist.

1. Add the script tag

HTML
<script
  src="/assets/checkupstream-sdk.js"
  data-sdk-key="cup_sdk_your_key"
  data-services="api.stripe.com,api.openai.com"
  async
></script>

Package setup after release

After the public npm release, a site with a bundler can use the package and call init() directly.

src/checkupstream.ts
import { checkupstreamBrowser } from "@checkupstream/sdk-browser";

checkupstreamBrowser.init({
  sdkKey: "cup_sdk_your_key",
});

Continue your setup

Check runtime availability and credentials before deploying an integration.