Skip to main content
Installing using Twilio Segment

Get Chameleon up and running on your website with only a few clicks by using Twilio Segment

Chameleon Team avatar
Written by Chameleon Team
Updated over a week ago

Chameleon works with JavaScript. In order to activate and display in-product Experiences to your users, you will need to deploy the Chameleon code snippet to your website or web application.

There are different methods to do this; using Twilio Segment, you can get up and running in just a few minutes.


About Twilio Segment

Twilio Segment is an API manager that allows you to easily turn on or off third-party code snippets in their applications. To use Twilio Segment, you first install their code directly on your product and then use their dashboard to manage other third-party integrations, such as Chameleon. 

You must be using TwilioSegment's JS library for Chameleon to function when installing this way.

When using this method to install Chameleon on your product: 

  • Chameleon is only installed on sites/pages where Twilio Segment is installed.

  • Chameleon features will only appear on pages where Twilio Segment's identify method is called.

  • In addition to installing the Chameleon code, Twilio Segment sends user data to Chameleon. You can leverage this to target Experiences to specific users

  • Chameleon also sends data (e.g. about your Experiences' performance) back to Twilio Segment, which you can use in other services connected to Twilio Segment. You can leverage this to coordinate all your user communication and view all product data in one place. 

If you use Twilio Segment, we strongly recommend installing Chameleon this way. It makes Chameleon's implementation easier, more powerful and will help your tech stack function more synchronously.


Installing using Twilio Segment

🔐 To access the installation page, you need to have created a free Chameleon account. You can create one here.

With Segment installed on your product, go over to the installation page and follow the steps below to install Chameleon.

👉 If your product has over 10k MTUs, speak with us! We can provide you with a tailored plan and pricing package. 

Once you pick to install via Segment you'll see two options:

  • adding Chameleon as a website source -- this adds Chameleon as a website within your Twilio Segment workspace

  • sending data from a server source -- if you're sending data from a server source, you can use this method and copy the API Key provided here

  1. Select the option to "add Chameleon as a Website Source"

  2. Copy the API Key from the Chameleon Dashboard & the Fast URL

  3. Add a new destination to Segment and paste the Token copied from the Chameleon Dashboard, in "Connection Settings" and the Fast URL in the "fastUrl" field.

  4. Next, you can Encode your user IDs with a Secret Key to prevent any unauthorized access to your data. Although this is optional, we strongly recommend it.

To encode your User IDs first pick your preferred server-side language from the dropdown. Insert your Secret Key and paste the code snippet into your application.

When using within your backend, we suggest you store this as an environment variable to avoid exposing the key.

After completing these steps, Chameleon is installed on your application and data is flowing! The final step in the Dashboard is to verify your installation and check that the domains you want to use Chameleon on are identified.

If you install Chameleon on a domain that's different from your email domain, it will be automatically disabled, and you should manually enable it (on the "Verify installation page, or from your Environments). The same goes for new subdomains that you add to already-enabled domains.

Twilio Segment may take up to 45 minutes to propagate setting or integration changes; you can verify the installation by going to the 'Event Delivery' section (in the Chameleon destination) to check if data is syncing to Chameleon.

👉 See all you can achieve in your product with Chameleon when you install with Twilio Segment.

Did this answer your question?