Sending event data to Chameleon can be valuable for:

  • Targeting users with tours based on what they have done.
  • Tracking conversion goals for tours.

Via REST API

Send a POST  to https://observe.trychameleon.com/profiles
Include a UID  that uniquely identifies the user in your database (required)
Include a name  that names the "thing the user did" (required)
Include any and all parameters pertinent to the user (optional)

Example: Create an event for user with uid=123  when they  "Imported leads"  and the total number of leads is 2817.
Request:

curl -X POST -H "X-Account-Token: SECRET" -d '{"uid":123,"name":"Imported leads","leads_count":2817}' https://observe.trychameleon.com/events

Response:

{
  event: {
    id: "590b80e5f433ea8000000207",
    profile_id: "590b80e5f433ea81b96c9bf6",
    uid: "imported_leads",
    name: "Imported leads",
    leads_count: 2817
    ...
  }
}

Via JavaScript API

If you have implemented Chameleon directly via the JS (and have not used Segment.com) then you may wish to supplement your user attribute data with user action data. This will be powerful for showing tours in response to what users do. 

To use the JavaScript API, using our chmln.track method:

chmln.track(EVENT_NAME);  // The name of the event (e.g. "Subscribed to Plan", "Imported leads")

(Note: Chameleon ignores events from admins, so they don't clog up your analytics. In order to test whether the track method on your page is working, you'll need to be logged out of the browser you're testing on, or use Chameleon's User Testing mode.)

Did this answer your question?