Chameleon API 101: Personalize and Analyze Your In-Product Experiences

Chameleon’s new API empowers you to send Microsurvey responses to other systems, better query Tour and user data, and add a layer of security.

Pulkit Agrawal
9 min read
Chameleon API 101: Personalize and Analyze Your In-Product Experiences

Chameleon has a revamped API and a new developer hub. Check it out here. Feel free to email us with any feedback or questions. 

Fill me in: what’s an API?

If you’re unfamiliar with the concept of an API, it’s a set of operations that can be performed using code, to communicate data between your systems and your Chameleon account—the API allows two applications to talk to each other.

What can you do with the Chameleon API?

At a high-level there are a few main things you can do using the Chameleon API:

Send data to Chameleon

This can include letting Chameleon know when a user completes an action, or when their profile changes (e.g. they convert to paid). 

You can remove/delete user data, opt a user out of Chameleon Experiences, and send variables for users to use within the copy of any Experience (e.g. user first names). 

Get data from Chameleon

You can download data from Chameleon (e.g. responses to Microsurveys) periodically, or forward Chameleon-tracked events (e.g. Tour completed) in real-time to your database, data warehouse, or other tools. 

You can also do things like download a list of all users, segments, Experiences, etc. or get all the stats on a particular Experience. 

Manage Experiences

You can use the Chameleon API to show a Tour or Launcher, or approve many domains within your product to show Chameleon Experiences. You can also get the status of a Launcher Checklist Item, to understand the progress of a user.

You don’t need the API to use Chameleon

Chameleon is a no/low code product, meaning that you can do a variety of things without needing any engineering resources. These include: 

  • Installing Chameleon (using Segment.com)

  • Setting styling (Chameleon automatically finds the colors on your page, and you can use your exact fonts just by typing out the font names)

  • Creating Experiences, such as modals, banners, Tooltips, NPS surveys, checklists, etc. 

  • Targeting Experiences based on user data (that’s flowing in from Segment.com, or via our two-way integrations with analytics tools such as Amplitude and Mixpanel)

  • Activating Experiences

  • Viewing performance of Experiences, downloading Survey responses, etc.

Note: if you don’t use Segment.com then you will need your engineers to install the Chameleon code snippet and send user data. However, this is a one-time task, and engineers are not needed on a recurring basis. 

Extending use cases by leveraging the Chameleon API

The Chameleon API exists to provide more flexibility for managing the data flows in and out of Chameleon. While we have an extensive set of native integrations, Chameleon’s API enables you to create custom connections to your systems or stack. 

Here are ten examples of how you can use the Chameleon API:

1. Download Microsurvey responses

Microsurveys are critical in creating a continuous feedback loop inside your product, which you can leverage to drive greater product success. Microsurveys are short (single question with optional comments), contextual (can be shown on a specific page), and triggered (based on user data). 

You can connect Chameleon with Slack or Zapier (and webhooks—coming soon) to get response data in real-time, or you can use our REST API to download all your Microsurvey response data periodically. You can then import that into your data warehouse or other tools, to better synchronize qualitative user data with your quantitative user data. 

📗 Review the documentation for how to download Microsurvey responses via REST API here

2. Create a performance dashboard in your BI tool

Data on how users are interacting with Chameleon Experiences shouldn’t be viewed in a vacuum. This data is best understood within the context of how users are engaging in your product and alongside key metrics such as engagement, retention, conversion.

You can use Chameleon’s native analytics integrations (e.g. Mixpanel, Amplitude, Heap, Google Analytics) to automatically send all the data Chameleon collects (such as Tour started, Button clicked, Survey dismissed). 

However, you can also download all this data into your data warehouse and then use your existing BI tool (such as Looker or Tableau) to create dashboards and view this data combined with underlying product analytics data

📗 Review the documentation for how to download Tour performance data here

3. Get an alert when an Experience isn’t completed in X time

Certain Chameleon Experiences may start when a particular element appears on the page, or when the state of an element is defined a certain way. This can allow you to trigger Experiences when the page content changes and the URL does not. 

In these instances we encourage you to ensure the way the element is defined is robust and not brittle (e.g. by avoiding using HTML Hierarchy as a matching condition).

Even in these situations, the element definition may change when you make updates to your product, and this could prevent your Chameleon Experience from showing.  You can configure a notification to be sent whenever a particular Experience hasn’t been started or seen in a set period. 

You can use the Chameleon API to notify when this is the case and then send a Slack message or email to the relevant team. 

📗 Review the documentation for how to download Tour performance data here

4. See which users saw a particular Experience

Knowing who saw a particular Experience and how they interacted can help build a holistic understanding of user engagement. It can help qualify new leads, determine whether to reach out for upsell opportunities or provide more targeted support. 

If you have connected your analytics tool to Chameleon, then events collected by Chameleon will automatically be attached to each user’s profile, so you can view this data there. You can also download a raw CSV with all the data from a particular Experience, from your Dashboard

If you want to create a one-off query which includes multiple criteria (e.g. users who saw Experience X but exited on Experience Y) or is not using one of our native analytics integrations, you can use our API to obtain this data. 

📗 Review the documentation for how to search a list of users matching certain conditions here

5. Trigger email when Experience completed/button clicked

Your best chances for product success and user engagement come when using a combination of channels effectively. For effective user onboarding, you need to use emails as well as in-app messages—there are actually 7 different channels for user onboarding that you should be aware of. 

You can configure an email to be sent after someone interacts with a Tour by finding users based on their interaction state with a Tour. This can be highly useful if someone is dismissing the Tour and you’d like to send them a follow-up with more information, or if you present an offer inside your product and someone is interested in learning more (i.e. they complete the Tour by clicking a CTA on the final Step). 

📗 Review the documentation on how to return users based on their interaction state with a Tour here. You can also listen for Chameleon events on the page using our Javascript API; review the documentation for that here.

6. Personalize content within Experiences (including by language)

Users are far more likely to engage with your in-product experiences if they are relevant and targeted. 

Here are some examples of the types of personalized user data you could send:

  • First name (to address a user by their name)

  • Role / Company Name

  • AM or CSM name, or meeting scheduling link (to book a meeting)

  • Unique IDs referenced in the URLs (to create personalized links)

You can also extend this method to localize the content for users by language. 

Set up variables for each Step, e.g. `welcome1.step1.title` and then use this as the title text. You can send the correct language version of this content for each use—so when the user sees the Step it will then contain the correctly translated copy! 

Improve the personalization of your experiences by including user-specific content, using variables.

📗 Read more about how to do this here and read how to send user data via our JavaScript API here

7. Trigger a Tour whenever something specific happens on a page

One of the most powerful aspects of delivering in-product experiences is that they can be hyper-contextual; shown at the right moment to the right user at the right place. To enable this, the necessary data must be sent to Chameleon. 

You can send event data to Chameleon so that Chameleon knows whenever a user completed a specific event. You can then target Experiences based on these events and they will show in real-time* as soon as that user takes that action. 

📗 Review the documentation on how to send Chameleon data via the Javascript API here and the REST API here

* When sending event data using the Javascript API. When using the REST API, data will be fetched on the page when a page refresh occurs, or another user property is updated.

8. Get a list of all Experiences targeting a particular audience

As you create different groups of users as segments, you may wish to better understand or to display internally the different Experiences set to show for each. You can easily list all the Experiences connected to a defined segment. 

📗 Review the documentation on how to find Experiences for a segment here.

9. Opt a user out of all Chameleon Experiences

In many ways showing Experiences inside the product resembles sending users an email, but with more context and greater ability for a user to act on it. 

Another benefit of in-product experiences is that they are not explicitly governed by opt-out rules, as the user has already consented to use your product. However, you may offer the opportunity to your users to not see any Chameleon experiences by leveraging our API. 

📗 Read the documentation for how to disable Experiences for a certain user here.

10. Delete user data (e.g. to comply with GDPR requirements)

Chameleon is compliant with privacy regulations such as GDPR and CCPA; you can read more about this in our Help Center here. This means Chameleon complies by offering you and your end-users the rights established in these regulations, including the right to be forgotten. 

You can email us with any GDPR requests or use our API to delete a user profile from within Chameleon. 

📗 Read the documentation for how to do this here.

How to start using the Chameleon API

You can read all the documentation for how to get started in our new Developer Hub here

To get started, you’ll need to have a Chameleon account (sign-up for one here), and then generate a secret API key to use from within your Chameleon Dashboard here

We’d love to get your feedback about how you’re using the API and what else you’d like to see. 

📮 Send us a message by clicking here and share your opinions!


Boost product adoption and
reduce churn

Get started free in our sandbox or book a personalized call with our product experts