chmln.on JavaScript API method.
Common use cases include:
- Syncing the Experience interaction data (automatically collected by Chameleon) to your database/warehouse or any other tools, using the methods below.
- Getting access to the A/B testing attribute (
percent) when the Chameleon User Profile is loaded. - Logging Experience data to an integration that Chameleon does not yet have a native integration with
- Knowing when the HelpBar is opened/closed or when data is needed.
An overview of the data Chameleon collects for analysis, by reading this article.
List of supported events
| Event | Purpose | Description |
|---|---|---|
chmln:event | Info | All Survey, Tooltip, Tour, and Launcher events. For more information about which events Chameleon tracks, see this doc, or download a data schema here. |
tour:event | Info | Only Survey and Tour events, including Started, Completed, Exited, Step Seen, Button Clicked, etc. |
after:account | Info | After the account data is present on the page. |
after:profile | Info | After the User Profile loads from the Chameleon backend API, now all of the profile data is loaded. |
load or load:chmln | Info | When the Chameleon JavaScript has been loaded but before any Experiences will display/show/start. |
identify:request | Info | Triggered directly before the network request associated with identifying this User Profile. The callback signature (arguments) are options, profile with options having yet to be added to the profile object. |
identify:sync | Info | Triggered upon the completion of the network request associated with identifying this User Profile. |
HelpBar events (only
app:navigate is required)
| Event | Purpose | Description |
|---|---|---|
app:navigate | Action | When the HelpBar needs to navigate within the single-page app |
helpbar:opened | Info | Know when the HelpBar is opened |
helpbar:closed | Info | Know when the HelpBar is closed |
helpbar:search:input | Info | When the user types/pastes into HelpBar input box; use to track specific input as it happens |
helpbar:search:content | Override (optional) | When the HelpBar is making a query for custom content; use to override the default behavior |
helpbar:search:external | Override (optional) | When the HelpBar is making a query for Help center content; use to override the default behavior |
helpbar:search:answer | Info | When the HelpBar finishes answering a question |
helpbar:item:action | Info | Know when a specific SearchItem is triggered |
helpbar:item:action:error | Info | When a specific SearchAction encounters an error |
helpbar:items:recent | Override (optional) | When the HelpBar needs a list of the most recently actioned SearchItems; use to override the default behavior |
helpbar:items:pinned | Override (optional) | When the HelpBar needs a list of pinned SearchItems; use to override the default behavior |
Typical ordering as Chameleon boots:load,load:chmln,after:account,identify:request,identify:sync,after:profile,tour:event,chmln:event
Examples
HelpBar
The JavaScript API for HelpBar has many examples and use cases.Listen for Tour/Survey events — send to custom integration
This might be relevant in the following instances:- Sending data to a tool without a native Chameleon integration.
- Sending data to a tool via a backend/server-side method.
Send properties
This might be relevant in the following instances:- Sending data to your database, to allow deeper analysis of Chameleon Events.
- Sending data that is not collected by your analytics tool (e.g. “Chameleon testing ID”).
Sending data to other tools directly
For example, you can send the Chameleon “Percentage value” to your analytics solution, using a script like the below (with examples for Segment and Mixpanel):Note: You can easily adapt this based on where you’d like to send this data in your system.

