Skip to content

v2.0.0

Choose a tag to compare

@ianwieds ianwieds released this 15 Mar 10:39
· 5 commits to main since this release

BREAKING

  • Replaced endUserId option with rich user object (id, firstName, lastName, email, photoURL, plus arbitrary fields)
  • Removed data-end-user-id and data-api-url script tag attributes from CDN auto-init
  • Renamed apiUrl option to _embedUrl (internal/private)

Added

  • user option for passing user identity (id, name, email, photo, custom fields)
  • context option for page metadata and tags
  • setUser() method for updating user identity after initialization (e.g., post-login)
  • Auto-collection of page.url, page.referrer, page.title into context
  • Handle chatsy:close postMessage from embed (allows embed to request widget close)
  • API_URL constant extracted as single source of truth

Changed

  • chatsy:init payload now sends user and context instead of endUserId
  • Origin validation and iframe URL use API_URL constant with _embedUrl override
  • README updated with new user/context configuration and setUser() documentation