Summary
Wrapper is missing several documented LiveAgent.* visitor/ticket APIs, button-level callbacks (onOnline/onOffline/onClick/onCloseFunction_), and the auto-tracking control hook; current track() and hide() implementations don't match documented semantics.
Gaps found
Missing API surface
Events not bridged
Config options not exposed
Deprecations in our current code
Re-evaluate "unsupported" markers
Intentionally out of scope
- Server-side / agent-side REST ticketing API (
https://www.liveagent.com/api/, LiveAgent-api-python).
- Live Chat Tracking plugin configuration (admin-side JS snippets for GA/gtag).
- Salesforce "Live Agent" (different product, frequently conflated in search results).
- Visual/CSS theming of the button (server-side admin config bound to
buttonId).
Sources
Summary
Wrapper is missing several documented
LiveAgent.*visitor/ticket APIs, button-level callbacks (onOnline/onOffline/onClick/onCloseFunction_), and the auto-tracking control hook; currenttrack()andhide()implementations don't match documented semantics.Gaps found
Missing API surface
LiveAgent.addUserDetail(key, value)— modify a single user property (email/firstName/lastName/phone) without resetting the others — https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascriptLiveAgent.addTicketField(key, value)— assign custom ticket-field values from the visitor side (currently we only useaddContactField) — https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascriptLiveAgent.clearAllUserDetails()— clear all customer data and contact/ticket fields (since v5.17); needed for propershutdown()/identity reset — https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascriptLiveAgent.setUserDetails()(no-arg form) — clears all customer data (since v5.17); we never invoke this on shutdown — https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascriptLiveAgent.setVisitorLocation(url)— set the customer's current page URL into the conversation thread; this is the closest thing to an explicitpageView()call — https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascriptLiveAgent.disableOnlineVisitorsTracking()— must be callable BEFOREcreateButton; currently no way to opt out of the per-few-seconds visitor-update polling — https://support.liveagent.com/334470-Disable-online-visitors-tracking-for-high-load-websitesLiveAgent.instance.hasOpenedWidget()— returns true if any widget is currently open; missing helper for visibility/state queries — https://support.liveagent.com/207659-JavaScript-APILiveAgent.createForm(id, element)— alternative tocreateButtonfor offline contact-form widgets; not exposed — https://support.liveagent.com/418636-Prefill-email-and-name-for-customerLiveAgent.createButton(id, element)second argument — docs use the wrapping element (e) as the second arg; our call only passes the id, which silently drops custom-HTML container support — https://support.liveagent.com/258695-Creating-a-multi-widgetEvents not bridged
button.onOnline = fn(per-button "agents available" callback, since v4.17.3) — https://support.liveagent.com/461948-ButtononOnline-ButtononOfflinebutton.onOffline = fn(per-button "agents unavailable" callback, since v4.17.3) — https://support.liveagent.com/461948-ButtononOnline-ButtononOfflinemybutton.onClickon the button returned fromcreateButton; we currently expose only an unused, top-levelLiveAgent.onChatStartedthat the vendor does not document — https://support.liveagent.com/691328-Start-and-Close-chat-eventsmybutton.onCloseFunction_; not bridged — https://support.liveagent.com/691328-Start-and-Close-chat-eventsConfig options not exposed
buttonIdcarries this configuration and there is no JS override — https://support.liveagent.com/373207-Creating-chat-buttonscwid,phone,email,firstName,lastName,note,pt) — no helper for building an inline-chat URL — https://support.liveagent.com/498003-Chat-for-mobile-apps-and-inline-chatDeprecations in our current code
track(event, metadata)is implemented asLiveAgent.addContactField(event, metadata ?? true). This pollutes contact fields and is not how LiveAgent models event tracking — events are delivered via the server-configured Live Chat Tracking plugin. Either remove, throwOperationNotSupportedError, or rename and document that it writes a contact field — https://support.liveagent.com/839467-Live-chat-tracking-pluginLiveAgentAPI.hideButton?(buttonId)is not present in vendor docs. The optional chaining masks the fact that this method does not exist —hide()is effectively a silent no-op. Either drop it or implement via DOM/CSS on the rendered button container. Vendor docs describe show/hide viawindow.location.pathnameconditionals aroundcreateButton, not via a runtime API — https://support.liveagent.com/551283-Advanced-widgets-integrationsLiveAgentAPI.onChatStarted/onChatEndeddeclared on the typings as top-level properties ofLiveAgentare undocumented — the documented surface is per-button (mybutton.onClick,mybutton.onCloseFunction_). Drop these dead types — https://support.liveagent.com/691328-Start-and-Close-chat-eventscurrentSubdomainis captured but never read afterload(); either expose it viagetConfig()(already does) or drop the duplicate state.Re-evaluate "unsupported" markers
pageView()is a hard no-op. Track.js already auto-polls visitor location every few seconds, andLiveAgent.setVisitorLocation(url)exists for SPA route changes. Replace the no-op with a call tosetVisitorLocation(info.path)so SPA navigations are reflected in the conversation/visitor view — https://support.liveagent.com/147815-Set-visitor-specific-values-with-javascriptshow()is a comment-only no-op. Vendor offers no runtime show API; documented pattern is to gate thecreateButtoncall bywindow.location.pathname. Either keep as no-op with a clearer doc-comment pointing at the docs, or implement DOM-level show on the injected button container — https://support.liveagent.com/551283-Advanced-widgets-integrationsIntentionally out of scope
https://www.liveagent.com/api/,LiveAgent-api-python).buttonId).Sources