Widget SDK
The Signalpad widget exposes a global window.signalpad object after the script loads. All methods are safe to call before the widget finishes initialising; they queue internally and flush once the widget is ready.
Installation
Embed the script in your HTML. One tag, no bundler required.
<script src="https://www.signalpad.app/widget.js" data-project="your_key_here" data-api="https://www.signalpad.app" data-consent="required" ></script>
| Attribute | Type | Description |
|---|---|---|
| data-projectrequired | string | Your project key. Found in Dashboard → Settings → Widget. |
| data-apioptional | string | Override the API base URL. Defaults to https://www.signalpad.app. Useful for self-hosted instances or local development. |
| data-consentoptional | string | Set to required for GDPR-style consent gating: the widget collects nothing until you call signalpad.consent("granted"). See Privacy & consent. Omit for default behaviour. |
| data-environmentoptional | string | Tag events with an environment (e.g. production, staging) so you can filter analytics and keep test traffic out of your real numbers. |
signalpad.identify(userId, attributes?)
Associates the current session with a known user. Call this after your auth flow resolves. Attributes are stored against the user and used by the targeting engine to decide which releases to show.
| Parameter | Type | Description |
|---|---|---|
| userId | string | Your internal user ID. Must be stable across sessions. |
| attributes | object | Optional. Any JSON-serialisable key-value pairs, such as plan, role, company, created_at, etc. Used for advanced targeting. |
// Basic: user ID only
signalpad.identify("usr_4821");
// With attributes for targeting
signalpad.identify("usr_4821", {
plan: "pro",
role: "admin",
company: "Signalpad",
created_at: "2024-06-15",
beta: true,
});identify() after track(), previous anonymous events are not retroactively merged. Call identify() as early as possible in your app lifecycle.signalpad.track(eventName, properties?)
Records a product event. Events auto-register the first time they arrive; no dashboard setup needed. They show up under Events, and you can pick any event as a release’s success event to measure adoption. Calls are batched and sent efficiently in the background.
| Parameter | Type | Description |
|---|---|---|
| eventName | string | A stable event key. Convention: object.action, past tense (e.g. export.completed). |
| properties | object | Optional. Extra context stored with the event and available as breakdowns. Sensitive keys (email, password, token…) are stripped automatically. |
// Track any product event; it auto-registers
signalpad.track("voice_note.sent");
// With properties (used for breakdowns)
signalpad.track("export.completed", {
format: "csv",
row_count: 1420,
});
// React example: in an event handler
function handleExport() {
exportData();
signalpad.track("dashboard.exported");
}signalpad.register(properties)
Registers “super properties” that are merged into every subsequenttrack() event automatically. Handy for context you want on all events: plan, workspace, app version.
signalpad.register({ plan: "pro", app_version: "2.4.0" });
// Every later event now carries plan + app_version
signalpad.track("export.completed"); // → { plan: "pro", app_version: "2.4.0" }signalpad.registerElement(key, elementOrRef)
Registers a DOM element under a named key so walkthroughs can spotlight it and a release’s “New” dot can sit on it. Use this instead of fragile CSS selectors: your elements are referenced by stable names regardless of class or ID changes. Adding data-sp="your-key" to the element works too.
const btn = document.getElementById("record-btn");
signalpad.registerElement("voice-record-btn", btn);import { useRef, useEffect } from "react";
function RecordButton() {
const ref = useRef<HTMLButtonElement>(null);
useEffect(() => {
// Pass the ref; the SDK reads .current automatically
signalpad.registerElement("voice-record-btn", ref);
}, []);
return <button ref={ref}>Record</button>;
}The key you register here must match the Element key set on each flow step in the walkthrough builder.
signalpad.open() / signalpad.close()
Programmatically open or close the “What’s new” panel. Useful when your own UI triggers the widget, for example a “Release notes” menu item.
No-code alternative: You can add the data-sp="open" attribute to any element on your site to automatically bind it to the open panel action.
// Open the list, same as clicking the launcher signalpad.open(); // Close it signalpad.close(); // HTML example: Add data-sp="open" to any button to auto-bind it! // <button data-sp="open">What's New</button>
signalpad.open() or an element with data-sp="open". New releases still reach people as a card, pop-up or “New” dot, as each release chooses.signalpad.startFlow(id)
Starts a walkthrough programmatically, bypassing the panel UI. Pass a release IDto start the walkthrough attached to that release, or a walkthrough ID for a flow whose trigger is set to Manual. Use this to launch tours from your own buttons, a help menu, or a deep link from an email or notification.
// A release's walkthrough: id is the release ID from the dashboard
signalpad.startFlow("f3a1b2c4-d5e6-7890-abcd-ef1234567890");
// Standalone flow with a Manual trigger: id is the flow UUID
document.querySelector("#help-tour").onclick = () =>
signalpad.startFlow("a1b2c3d4-e5f6-7890-abcd-ef1234567890");A standalone flow only launches if it is active, its audience targeting matches the current user, and it has not already been completed (for once-per-user / until-completed frequencies). Only one flow runs at a time.
signalpad.consent(status)
Grants or withdraws consent to collect data. Only has an effect when the widget is installed with data-consent="required". Call it from your cookie banner’s Accept / Reject handlers.
// User clicked "Accept" in your consent banner
banner.onAccept = () => signalpad.consent("granted");
// User clicked "Reject" (or withdrew consent later)
banner.onReject = () => signalpad.consent("denied");Privacy & consent
Signalpad is a data processor: the widget runs on your site and collects your end-users’ data on your behalf. Two features help you stay compliant (GDPR and similar).
Consent mode
Add data-consent="required" to the script tag and the widget starts in a fully dark state: no cookie, no collection, no network calls that record behaviour, until you callsignalpad.consent("granted"). It also honours the browser’s Do Not Track signal automatically. Callingconsent("denied") clears any queued events and stops tracking. Without the attribute, the widget behaves as before.
PII scrubbing
As a safety net, Signalpad strips personally-identifying data even if it’s passed by mistake. Sensitive property keys (email, password, token, ssn, card fields, and more) are dropped, email-shaped values are redacted, and sensitive URL query params (?token=, ?email=…) are removed from captured page URLs. Scrubbing runs both in the widget before sending and again on our servers at ingest.
Welcome-back recap Pro+
The widget announces at most one release per visit, so someone who comes back after two weeks won’t get a string of pop-ups. The recap covers the rest: when they open the list, one line on top says how much changed since they were last here, and every release they missed is right below it, ready to react to or start a walkthrough from.
Turn it on in Dashboard → Setup → Widget → Welcome-back recap and choose how many days away count as a break (catch_up_away_days, 7 by default). The widget checks each load against the person’s last_seen_at; no code changes needed.
localStorageand it isn’t shown again for the same releases. The list never opens by itself; the recap waits until they open it.Widget configuration
All widget configuration is managed from the dashboard, not in code. The widget reads its config on load from /api/sdk/config?key=YOUR_PROJECT_KEY. Changes in the dashboard take effect on the next page load.
| Option | Values | Description |
|---|---|---|
| position | bottom-right · bottom-left · top-right · top-left | Which corner the launcher, list and cards sit in. |
| theme | light · dark · auto | auto intelligently sniffs your host page for class="dark" or data-theme="dark" to instantly match your app's theme. If none are found, it falls back to the user’s OS preference via prefers-color-scheme. |
| trigger | on_click · on_event | on_click shows a launcher in the corner with a count; it opens the list. on_event hides the launcher, so the list opens only via signalpad.open() or data-sp="open". The list never opens by itself; older projects set to on_load behave like on_click. Each release chooses whether it also shows as a card or pop-up. |
| custom_css | string | Injected as a <style> tag after the widget’s default styles. Use it to override colours, border-radius, font. |
| catch_up_enabledPro+ | boolean | When true, returning users who’ve been away for catch_up_away_days+ days see a “Here’s what you missed” summary on first open. |
| catch_up_away_daysPro+ | number | How many days away count as a break for the welcome-back recap. Default: 7. |