For an overview of how the Chameleon API works, please first read this article.
List of supported events
-
load
- when thechmln
JavaScript has been loaded onto the page (but before any other processing is done) -
after:account
- After the account data is present on the page -
after:profile
- After the user loads from the Chameleon backend API, now all of the profile data is loaded -
tour:event
- When a tour is started, completed, exited or when a step is seen
Examples
Send events to your own systems or to a custom integration
chmln.on('tour:event', function(eventName, options) {
$http.post(internal_event_logging_url, {
name: eventName,
properties: options
});
});
Log the A/B testing group ID
chmln.on('after:profile', function() {
$http.post(internal_user_update_url, {
name: chmln.data.profile.get('percent'),
});
});