If you don't use Segment or GTM then you can install the code manually. This only takes a few minutes, and is similar to installing other JS snippets, such as for analytics or A/B testing tools.

There are TWO PARTS to it:

1. Script to publish tours -- The basic Chameleon snippet (with your unique token) that installs the Editor and allows you to create and publish tours

<script type="text/javascript">/* Chameleon - better user onboarding */!function(t,n,o){var a="chmln",c="setup identify alias track clear set show on off custom help _data".split(" ");n[a]||(n[a]={}),n[a].accountToken=o,n[a].location=n.location.href.toString();for(var e=0;e<c.length;e++)!function(){var t=n[a][c[e]+"_a"]=[];n[a][c[e]]=function(){t.push(arguments)}}();var s=t.createElement("script");s.src="https://fast.trychameleon.com/messo/"+o+"/messo.min.js",s.async=!0,t.head.appendChild(s)}(document,window,"TOKEN");

2. Identifying users (with chmln.identify ) -- Information about users for showing tours, URL matching, targeting specific audiences and personalization.

❗️ Note:

  • The user ID is *required for all users* (without it, they will not see any tours). 
  • The user email is necessary for some integrations to work correctly. 
  • The user created date is strongly recommended (to target new or old users)
// This is an example script, don't forget to change the PLACEHOLDERS.
// Please confirm the user properties to be sent with your project owner.
chmln.identify(USER.ID_IN_DB, {     // Unique ID of each user in your database (e.g. 23443 or "590b80e5f433ea81b96c9bf6")
  email: USER.EMAIL,                // Put quotes around text strings (e.g. "jim@example.com")
  created: USER.SIGN_UP_DATE,       // Send dates in ISO or unix timestamp format (e.g. "2017-07-01T03:21:10Z" or 1431432000)
  name: USER.NAME,                  // We will parse this to extra first and last names (e.g. "James Doe")
  role: USER.ROLE,                  // Send properties useful for targeting types of users (e.g. "Admin")
  logins: USER.LOGIN_COUNT,         // Send any data about user engagement (e.g. 39)
  project: USER.PROJECT_ID,         // Send any unique data for a user that might appear in any page URLs (e.g. 09876 or "12a34b56")

  company: {                        // For B2B products, send company / account information here
    uid: COMPANY.ID_IN_DB,          // Unique ID of the company / account in your database (e.g. 9832 or "590b80e5f433ea81b96c9bf7")
    created: COMPANY.SIGN_UP_DATE,  // To enable targeting all users based on this company property
    name: COMPANY.NAME,             // Send any data that appears within URLs, such as subdomains (e.g. "airbnb")
    trial_ends: COMPANY.TRIAL_ENDS, // Send data about key milestones (e.g. "2017-08-01T03:21:10Z")
    version: COMPANY.VERSION,       // If your software varies by version then this will help show the correct guidance (e.g. "1.56")
    plan: COMPANY.PLAN,             // Send null when no value exists (e.g. "Gold", "Advanced")
    spend: COMPANY.CLV              // Send other properties that will help in targeting users (e.g. sales rep, source, stage)

Adding Identity Verification

Identity Verification is a method to digitally "sign" the user data sent to Chameleon, such that Chameleon knows it is from your account. This prevents a third-party from sending us data on your behalf and also downloading your data through a malicious hack.

We strongly recommend that you enable Identity Verifications wherever Chameleon is installed. Learn more in the article below:

Get your snippet from the Setup dashboard

Your unique code snippet is available from your dashboard

You must be on a paid plan to access this (either by starting a free trial or contacting us at sales@trychameleon.com)

Helpful tips

  • Make sure the snippet is included on all private pages - typically before </head>.
  • Use the snippet found in your dashboard here, because it contains your personalized.
  • Ensure you replace USER.ID_IN_DB and the other PLACEHOLDERS with the variables your codebase uses for user IDs / records and the other data.
  • You can install this on any subdomain (or locally), although we recommend installing directly on production. Learn more here.
  • Plan which user data to include -- discuss with your team what would be useful for targeting Chameleon experiences or for personalizing content. 

Sending other user data

You can also send other user data, for example user actions ("events") inside your product, via our API. You have options to send data via our front-end JS API or back-end REST API. To learn more about how to send data to Chameleon, read this

Verifying successful installation

Once you have successfully installed the code snippet and a user has loaded the page then the domain will show up in your Chameleon dashboard (here). 

You can also verify that user attributes are being sent using the method outlined here or by checking the available data within the 'Imported Properties' and 'Imported Events' filters when creating a target audience. Learn more about that here

Did this answer your question?