An alternative Chameleon installation method is using a snippet manager, such as Google Tag Manager (GTM).

The set-up process is similarly quick and easy and will get you up and running in a few minutes. Refer to the following steps to set-up Chameleon on Google Tag Manager.

1. Create a new tag with the Chameleon code snippet

  • Name your tag as Chameleon.
  • Select Custom HTML under the Tag Configuration.
  • Copy your custom Chameleon code snippet from the Chameleon Dashboard and paste it on the HTML field in GTM.
  • Select All Pages for the tag's trigger.

2. Identify users and send user properties

To identify users and send user properties to use in Chameleon, you will need to create a unique User-Defined Variable for each property that you want to send.

  • Under Variables, create a new User-Defined Variable.
  • Select the Custom JavaScript variable type, under Variable Configuration
  • Paste the following code snippet, replacing the identified variable.
function() {
var uid = window.uid; //<REPLACE WITH USERID PROPERTY>;
return uid;
}
// Name the property by adding UID (in this case) in the Global Variable Name and Rename Variable fields

Note: It is mandatory to send a UID to identify users in Chameleon, otherwise your Experiences will not display.

Note: All data sent to Chameleon needs to be defined in these variables and interpolated into the snippet. In order to work correctly, these properties need to exist on the page so GTM can reference them: (email, created_at, any segment info, etc).

3. Publish the tag! 🚀

Go ahead and publish your new tag! By then, Chameleon will be deployed to your web application and you'll be able to launch in-product experiences and enable your users for success!

👉 Have any questions or issues? Review how to best get help

Want to know more?

Did this answer your question?