Developers

Integrate widgets without guessing

Embed configuration and rendering are distinct from delivery confirmation. Check the published site, not only the preview.

Floating widget

<script async src="https://mywidgetflow.vercel.app/widget.min.js" data-widget-id="YOUR_PUBLIC_EMBED_ID"></script>

Inline placement

<div id="quote-widget"></div>
<script async src="https://mywidgetflow.vercel.app/widget.min.js" data-widget-id="YOUR_PUBLIC_EMBED_ID" data-target="#quote-widget"></script>

For inline display, choose Inline in widget settings. A valid data-target ID takes priority. Otherwise, the widget appears next to its script when the script is inside the body.

Open and close a loaded floating widget

window.WidgetFlow.open("YOUR_PUBLIC_EMBED_ID");
window.WidgetFlow.close("YOUR_PUBLIC_EMBED_ID");

Call after the widget loads. A widget emits widgetflow:ready with a public embedId when mounted. Opening an inline widget or a widget that has not loaded has no effect.

Click-only and respectful offers

Add data-auto-open="off" to an embed script to disable automatic time, scroll and exit triggers while allowing deliberate opening with the launcher or public JavaScript API. On a store, mark any visible custom cart drawer or modal with data-wf-block-auto="true" to keep automatic offers out of checkout interactions.

Offer widgets wait at least 12 seconds for timed triggers and defer while a shopper is typing or a dialog is open. The offer can be skipped if the visitor stays busy. These rules affect only automatic opening; they do not prevent a visitor clicking the widget launcher.

Successful form-submission event

window.addEventListener("widgetflow:submitted", (event) => {
  if (event.detail.embedId !== "YOUR_PUBLIC_EMBED_ID") return;
  // This event contains no form contents or personal information.
  // Respect analytics consent before forwarding it elsewhere.
  console.info("WidgetFlow form accepted");
});

widgetflow:submitted means WidgetFlow accepted a form submission. It does not prove an email reached an inbox, a booking was created, or a payment succeeded.

CSS and browser support

WidgetFlow uses instance-scoped CSS, not Shadow DOM. Host-page global CSS can still affect an embed, so inspect controls on the installed site. Owner custom CSS accepts bounded regular rules and nested responsive @media rules, but not remote imports or URL-based resources.

The runtime requests public configuration at startup and normally refreshes at most once per 15 minutes while the tab is active. Visibility changes can trigger a refresh. This is a trade-off between freshness and server usage.

The JavaScript file is versioned through deployment. Check the actual transferred and compressed size in your browser Network panel. We do not publish an unverified performance number.

Installation guides · Report an integration issue

WidgetFlow Developer Integration | WidgetFlow