Skip to main content
This widget is deprecated. Existing integrations can continue using it, but new integrations should use Embedding Entity Onboarding instead.
The widget script embeds the legacy registration experience in your application. Use this page if your integration already depends on the legacy widget and you need to keep it working or troubleshoot it.

Add the script

Get your SCRIPT_URL and COMPANY_SLUG from the dashboard under Widget > Widget script, then add the script tag to your application.
<script
  async
  id="satws-widget-id"
  type="text/javascript"
  src="SCRIPT_URL"
  data-key="COMPANY_SLUG"
></script>
The data-key value identifies your widget configuration. Keep it aligned with the environment you are using.

Start and stop registration

After the script loads, use window.Satws.init() to open the registration experience.
window.Satws.init();
Use window.Satws.destroy() to close and clean up the widget.
window.Satws.destroy();

Sandbox warning

To show the legacy sandbox warning, pass data-sandbox="true" in the script tag.
<script
  async
  id="satws-widget-id"
  type="text/javascript"
  src="SCRIPT_URL"
  data-key="COMPANY_SLUG"
  data-sandbox="true"
></script>
The data-sandbox attribute only controls the warning shown to users. The token and script URL determine whether the widget connects to production or sandbox.

Events

Use window.Satws.subscribe to subscribe to widget events.
EventDescription
registerWithSuccessFired when registration succeeds.
errorOnRegisterFired when registration fails.
window.Satws.subscribe("registerWithSuccess", () => {
  // Continue your success flow.
});
window.Satws.subscribe("errorOnRegister", () => {
  // Show your error state or retry option.
});

Dynamic loading

If you load the widget dynamically in an SPA or through GTM, the script may not be ready when you call init(). Listen for widgetScriptLoaded before starting registration.
try {
  window.Satws.init();
} catch {
  window.addEventListener("widgetScriptLoaded", () => {
    window.Satws.init();
  });
}

Troubleshooting

  • Confirm the script tag uses the id="satws-widget-id" attribute.
  • Confirm data-key matches the widget configuration for the environment you are using.
  • Confirm the widget script is allowed by your Content Security Policy.
  • Subscribe to errorOnRegister so your application can show a useful error state.