For an overview of how the Chameleon API works, please first read this article.

Downloading tour performance data from your Chameleon account can be helpful in analyzing and visualizing tour effectiveness (within your internal analytics dashboards or other third-party solutions)

Get summary data for tours

Use this to get a basic overview of tours. 

Definition: 

https://analyze.trychameleon.com/campaigns

Query parameters:

  • from timestamp (Return stats from this time) *Optional* Default: 30 days ago 
  • to timestamp (Return stats until this time) *Optional* Default: now 

Examples:

curl -H 'X-Account-Secret: SECRET' https://analyze.trychameleon.com/campaigns

Result format:

{
  campaigns: [
    {
      id: '5490e56a653537000201000c',
      name: 'Dashboard Intro',
      conversion_on: '/settings/collaborators',
      conversion_kind: 'page',
      stats: {
        started: 4932,
        completed: 4180,
        exited: 752,
        ...
      }
      ...
    }
  ],

  next: {
    page: 1
  }
}

Get count of saved and published tours

Definition: 

https://analyze.trychameleon.com/stats/campaigns

Query parameters:

  • interval string (Return stats to this time interval: day  / week  / month ) *Optional*

Examples:

curl -X GET -H 'X-Account-Secret: "SECRET' https://analyze.trychameleon.com/stats/campaigns

Result format:

{
  campaigns: {
    count: {
      all: 14,
      published_at: 9
    },
    published_at: {
      "2016-01-01": 5,
      "2016-03-01": 2,
      "2016-03-02": 1,
      "2016-03-03": 1,
    }
  },
  filter: {
    interval: 'day'
  }
}

Get count of users interacting with tours

Use this to find out how many users started, exited or completed tours. 

Definition: 

https://analyze.trychameleon.com/stats/tours

Query parameters:

  • interval string (Return stats to this time interval: day / week  / month ) *Optional*

Examples:

curl -X GET -H 'X-Account-Secret: SECRET' https://analyze.trychameleon.com/stats/tours

Result format:

    {
      tours: {
        count: {
          all: 385,
          exited: 24,
          completed: 361
        },
        "575772bc0709210003542afa": {
          completed: {
            at: {
              "2016-08-01": 14,
              "2016-08-02": 18,
              "2016-08-03": 22
            }
          },
          exited: {
            at: {
              "2016-08-02": 2,
            }
          },
        },
        "56e897887ad8c10003abf66e": {
          completed: {
            at: {
              "2016-08-03": 12
            }
          },
          exited: {
            at: {
              "2016-08-03": 4
            }
          },
        }
      },
      filter: {
        interval: 'day'
      }
    }

Get count of users interacting with steps within a tour

Use this to find out how many users progressed through the tour. 

Definition: 

https://analyze.trychameleon.com/steps

Query parameters:

  • campaign_id string (The campaign / tour to be queried) *Required*
  • from timestamp (Return stats from this time) *Optional* Default: 30 days ago 
  • to timestamp (Return stats until this time) *Optional* Default: now 

To get the campaign ID, inspect the browser, as the gif below shows:

Examples:

curl -X GET -H 'X-Account-Secret: SECRET' -d 'campaign_id=ID' https://analyze.trychameleon.com/steps

Result format:

{
  steps: [
    {
      id: '5490e56a653537000201000c',
      name: 'Intro video',
      body: 'This 20 second video will get you started',
      stats: {
        completed: 4180,
        exited: 752,
        ...
      }
      ...
    }
  ],
  filter: {
    from: '30 days ago',
    to: 'Now',
  },
  next: {
    page: 1
  }
}

Get profile data for a specific user

Definition: 

GET https://observe.trychameleon.com/profile

Query parameters:

  • uid string (Unique user identifier in your system) *Required*

Examples:

curl -H 'X-Account-Secret: SECRET' https://observe.trychameleon.com/profiles?uid=...

Result format:

{
  profile: {
    id: '566f6846cf41d000030004b3',
    ...
}

Get number of users

You can query the number users based on when they were created or which segment they fall within. 

When filtering by created the response will have a time-series section for when the profile was created in your system. Additionally an interval of day, week and month is used to determine how to time-series the values.

When filtering by segment you must specify the segments using the segment_ids parameter. This will return the number of profiles matching all of the given segments. TK Segments can be listed on /segments.

Definition: 

https://analyze.trychameleon.com/stats/profiles

Query parameters:

  • by string (An enum (created / segment ) indicating by what metric to return results) *Optional*
  • interval string (Return stats to time-series to this interval (day  / week  / month )) *Optional* 
  • segment_id string (A specific segment to filter against) *Required when by=segment*

Examples:

curl -X GET -H 'X-Account-Secret: SECRET' https://analyze.trychameleon.com/stats/profiles

Result format:

{
  profiles: {
    count: {
      all: 10332,
      created: 8945
    },
    created: {
      "2015-08-01": 161,
      "2015-09-01": 782,
      "2015-10-01": 1016,
      "2015-11-01": 1204,
      "2015-12-01": 1580,
      "2016-01-01": 1832,
      "2016-03-01": 2370,
      ...
    }
  },
  filter: {
    interval: 'month'
  }
}

Get list of users

You can return the list of specific users based on how they interacted with a particular tour. For example, which users completed Tour A, or which have not exited Tour B.

Definition: 

https://analyze.trychameleon.com/measured/profiles

Query parameters:

  • from timestamp (Start time for filtering) *Optional* Default: 30 days ago 
  • to timestamp (End time for filtering) *Optional* Default: now 
  • limit integer (Number of records to return) *Optional* Default: 100 
  • page integer (Page number of records to return) *Optional* Default: 0 
  • sort string (Return latest / earliest records from the set of profiles) *Optional* Default: latest  
  • campaign_id string (Filter to users who have seen this campaign / tour) *Optional: use with campaign_status *
  • campaign_status string (Filter to users who have started , completed or exited the campaign / tour) *Optional: use with campaign_id *

Examples:

curl -X GET -H 'X-Account-Secret: SECRET' https://analyze.trychameleon.com/measured/profiles

Result format:

{
  profiles: [
    {
      id: '5490e56a653537000201000d',
      uid: '5fca5428-15d4-40e3-bfe1-fff906816ba1',
      email: 'john@example.com',
      ip: '74.8.1.1',
      percent: 34.295032,
      ...
    }
  ],
  filter: {
    from: '30 days ago',
    to: 'Now',
    limit: 100,
    page: 0,
    sort: 'latest'
  },
  next: {
    page: 1
  }
}

Get list of users

You can return the list of specific users based on how they interacted with a particular tour. For example, which users completed Tour A, or which have not exited Tour B.

Definition: 

https://analyze.trychameleon.com/measured/profiles

Query parameters:

  • from timestamp (Start time for filtering) *Optional* Default: 30 days ago 
  • to timestamp (End time for filtering) *Optional* Default: now 
  • limit integer (Number of records to return) *Optional* Default: 100 
  • page integer (Page number of records to return) *Optional* Default: 0 
  • sort string (Return latest / earliest records from the set of profiles) *Optional* Default: latest  
  • campaign_id string (Filter to users who have seen this campaign / tour) *Optional: use with campaign_status *
  • campaign_status string (Filter to users who have started , completed or exited the campaign / tour) *Optional: use with campaign_id *

Examples:

curl -X GET -H 'X-Account-Secret: SECRET' https://analyze.trychameleon.com/measured/profiles

Result format:

{
  profiles: [
    {
      id: '5490e56a653537000201000d',
      uid: '5fca5428-15d4-40e3-bfe1-fff906816ba1',
      email: 'john@example.com',
      ip: '74.8.1.1',
      percent: 34.295032,
      ...
    }
  ],
  filter: {
    from: '30 days ago',
    to: 'Now',
    limit: 100,
    page: 0,
    sort: 'latest'
  },
  next: {
    page: 1
  }
}

For any questions feel free to message us from the bottom right chat chat bubble.

Did this answer your question?