Reference

Web SDK reference

Complete parameters and behavior for every supported command.

Command reference

The Web SDK is the supported integration surface. Parameters marked with an asterisk are required.

open

Web SDK 1.8.0

Opens the widget.

whazzup('open')

Parameters

No parameters.

Behavior

Opens the current widget view and keeps the active session.

close

Web SDK 1.8.0

Closes the widget.

whazzup('close')

Parameters

No parameters.

Behavior

Closes the panel without ending the visitor session.

update

Web SDK 1.8.0

Updates page, title and language after navigation.

whazzup('update', { url: location.href, title: document.title, locale: 'en' })

Parameters

urlstring (URL)Current canonical page URL.
titlestringCurrent page title, up to 300 characters.
localestringInterface locale, for example en or de.

Behavior

Updates the active visitor session. Standard SPA URL changes are detected automatically.

Possible errors: invalid_inputinvalid_sessionorigin_not_allowed

identify

Web SDK 1.8.0

Links the session to a person and optionally a company - automatically from window.whazzupSettings or with a signed token.

window.whazzupSettings = {
  name: 'Ada Lovelace',
  email: 'ada@example.com',
  userId: '42',
  plan: 'pro',
  signedUpAt: '2025-04-01',
  monthlyValue: 49,
  company: { id: 'acme', name: 'Acme Inc', plan: 'business', size: 120, renewalDate: '2026-04-01' }
};
// or, verified:
whazzup('identify', { token: identityToken })

Parameters

namestringDisplay name of the signed-in person.
emailstringEmail address of the signed-in person.
userIdstringYour stable user ID, stored as external user ID.
companystring | objectCompany name, or an object with id, name, plan, size, renewalDate and free values.
consentbooleanSet to false to stop automatic context collection (referrer, campaign, device, page history).
tokenstringSingle-use HMAC token generated by your server. Optional; without it the person is stored as unverified.

Behavior

The loader reads window.whazzupSettings on start and whenever it changes, so no manual call is needed. Any other primitive value (up to 30) is stored as a custom attribute; numbers and ISO dates keep their type. Data sent without a token is stored as unverified. Setting window.whazzupSettings to null signs the person out.

Possible errors: signed_identity_requiredinvalid_identity_tokeninvalid_session

track

Web SDK 1.8.0

Sends a deliberately selected product event.

whazzup('track', { name: 'trial_started', properties: { plan: 'pro' } })

Parameters

name *stringStable event name beginning with a letter.
propertiesobjectSelected string, number, boolean or null values.

Behavior

Records a product event for the active visitor. Avoid sensitive or high-volume data.

Possible errors: invalid_inputinvalid_sessionrate_limited

show / hide

Web SDK 1.8.0

Shows or hides the launcher.

whazzup('hide')
whazzup('show')

Parameters

No parameters.

Behavior

Changes launcher visibility without changing the session.

logout / reset

Web SDK 1.8.0

Fully ends the current widget session on sign-out or account switch.

whazzup('logout')
// or before switching accounts:
whazzup('reset')

Parameters

No parameters.

Behavior

Invalidates the old session, clears its local identity and visitor keys, and starts a fresh isolated visitor session. The loader also detects changes to userId or email automatically.

shutdown

Web SDK 1.8.0

Hides the widget; destroy fully removes the instance.

whazzup('shutdown')
whazzup('shutdown', { destroy: true })

Parameters

No parameters.

Behavior

Hides the iframe by default. Use destroy only when permanently unmounting the integration.