Signals Docs
Reference

SDK API

The window.signals surface and init options.

The tag exposes a global window.signals object once loaded.

Methods

MethodSignatureNotes
initinit(options?)Called automatically on load unless data-no-init="true". Idempotent - the second call is a no-op
tracktrack(event, properties?)Queue an event (batched; flushed every 10s, at 20 events, and on page hide)
trackFromTargettrackFromTarget(event, target, properties?)Like track, but honors data-signals-no-capture on the target's ancestors
identifyidentify(distinctId, properties?)Switch to a known-user id and send $identify. Include email/phone in properties to power identity stitching
aliasalias(newId)Record an alias then switch the distinct id
groupgroup(type, key, properties?)Send $groupidentify
resetreset()Clear identity + super properties and mint a fresh anonymous id (use on logout)
optOut / optInoptOut() / optIn()Persistently disable/enable all tracking for this browser
hasOptedOuthasOptedOut(): booleanTrue when opted out or the browser sends Do-Not-Track
setSuperPropertiessetSuperProperties(props)Merge properties attached to every future event
flushflush()Force-send the current batch
getDistinctIdgetDistinctId(): stringThe current visitor id

Init options

signals.init({
  apiKey: "sig_live_…",          // required (or data-signals-key)
  host: "https://api.pixelfox.app", // ingest API base URL
  autocapture: true,              // clicks/submits/pageviews/forms (default true)
  inventory: true,                // element auto-discovery (default true)
  remoteEvents: true,             // dashboard-defined definitions (default true)
  vendorTags: true,               // Clarity/Pixel/ttq/gtag injection (default true)
  capturePageview: true,          // initial $pageview (default true)
  engagement: false,              // scroll/time/rage-click/vitals/errors bundle (default false)
  productPathPrefixes: ["/products", "/categories"], // catalog_filter_applied scope
});

All feature flags except engagement are opt-out - everything is on by default. engagement (also data-signals-engagement="true" on the tag) loads a second, lazy bundle so the core tag stays inside its size budget.

Reserved event names

$pageview, $identify, $create_alias, $groupidentify are emitted by the SDK itself. Names starting with $ are reserved; use plain snake_case for your own events.

Auto-captured events

With autocapture on: $pageview, catalog_filter_applied, product_viewed, section_viewed, image_load_failed, form_validation_error, stock_status_displayed, form_abandoned, page_not_found, plus any event named by a data-signals-event attribute.

With engagement on, additionally:

EventPropertiesWhen
scroll_depth_reacheddepth (25/50/75/100), pathnamefirst time each bucket is passed per page
time_on_pageduration_ms, active_ms (tab visible), pathnameon leaving the page or an SPA navigation
rage_clicktag, id, text, pathname3 clicks on one element within 800 ms
dead_clicktag, id, text, pathnamea click on a non-interactive element that changed nothing within 1 s
web_vitalslcp, fcp, cls, inp, ttfb (ms; CLS unitless), pathnameonce, when the page is hidden or unloaded
$exceptionmessage, source, line, stack, unhandled_rejectionuncaught errors and unhandled promise rejections

On this page