Skip to main content

Console commands quick reference

A reference guide to every browser console command used to inspect and debug Chameleon Experiences that aren't showing, including commands for checking installation, audience targeting, URL rules, and experience state.

Written by Amanda Oliveira
Updated over a week ago

This page is a cheat sheet for every browser console command used to inspect and debug Chameleon Experiences. All commands are temporary — they run only in your current browser session and have no impact on other users or your account.


Lots of info about what Chameleon is doing behind the scenes in your app is available with a few browser console commands.

These are temporary commands run just within your browser, and will not impact your application permanently or for any other users. To clear these commands you can simply refresh the page.

ℹ️ Open your browser console with cmd + opt + J (Chrome on Mac) or ctrl + shift + J (Chrome on Windows), or right-click anywhere on the page → InspectConsole tab


Console Commands

Installation and setup

Command

What it does

When to use it

chmln.Snippet.debug()

Checks whether the Chameleon snippet is installed and running correctly. Returns a confirmation message if successful.

First step when Experiences are not showing at all. Also useful on localhost.

chmln.data.profile

Returns the user profile object. If this is not undefined, the user is being identified to Chameleon.

Check whether chmln.identify() has been called successfully.

chmln.data.profile.attributes

Returns all user properties Chameleon has received for the current user.

Compare against your Segment rules to verify property names, values, and data types.

chmln.data.company.attributes

Returns all company-level properties Chameleon has received.

Debug company-based targeting rules.

Experience status

Command

What it does

When to use it

chmln.debug()

Lists all published Experiences in your account with their current display status. Expand any entry with > for details.

General starting point when you don't know which Experience is causing the issue.

chmln.debug("EXPERIENCE_ID")

Shows the detailed status of a specific Experience,

Primary debugging command when you know which Experience is not behaving as expected.

chmln.data.campaigns.pluck('name')

Returns a simple list of all published Experience names.

Quick check to confirm an Experience is published and visible to the snippet.

chmln.decorators.Campaigns.decoratorTour.model.get('name')

Returns the name of the Experience that is currently running or waiting to display.

Identify which Experience is currently active when you can't tell from the UI.

Audience targeting

Command

What it does

When to use it

chmln.data.campaigns.each(function(c){console.log('"'+c.get('name')+'"',chmln.lib.segmentedBy(c.segment()))});

Lists every published Experience alongside true or false — whether the current user matches that Experience's target audience.

Find which Experiences the current user qualifies for, or confirm an audience rule is matching/not matching as expected.

URL matching

Command

What it does

When to use it

chmln.data.campaigns.each(function(c){var f=c.steps().first(); console.log('"'+c.get('name')+'"',!!f?f.isLive():'false')});

Lists every published Experience alongside true or false — whether the first Step's URL rule matches the current page.

Debug URL matching for all Experiences at once, especially useful in single-page applications.

Experience history and state

Command

What it does

When to use it

chmln.data.tours.each(function(t){console.log(t.get('state'), ':', t.get('campaign_name'));})

Lists every Tour the current user has interacted with and its state: displayed, started, completed, or exited.

Check whether a user has already seen a Tour and what state it was left in.

User properties and account data

Command

What it does

When to use it

chmln.data.segment_properties.where({kind: 'profile', source: 'chmln'}).map(function(p){return p.get('prop')})

Returns all user property names that have been sent to your Chameleon account (across all users, not just the current one).

Confirm a property name exists in your account before using it in a Segment rule.

Session management

Command

What it does

When to use it

chmln.clear()

Clears all currently active Chameleon Experiences from the page for the current session. Does not affect other users or account settings.

Dismiss an active Experience during testing without reloading. Also called on user logout in single-page application implementations.

chmln.show("EXPERIENCE_ID")

Forces a specific Experience to show immediately, bypassing audience targeting and URL rules.

Test an Experience's display without meeting all the display conditions. Useful on localhost or staging.


How these commands relate to each other

When troubleshooting a specific Experience that is not showing, run these commands in order:

  1. chmln.Snippet.debug() — confirm installation

  2. chmln.data.profile — confirm user identification

  3. chmln.debug("EXPERIENCE_ID") — check URL rules, audience, element, and rate limit

  4. chmln.data.profile.attributes — verify the property values Chameleon has for the current user


Still stuck?

💡 Tip: If you're working through these commands and want a faster path to answers, try Copilot — it can help you interpret debug output and suggest next steps based on your specific setup. Sometimes a quick question gets you unstuck faster than running through every command manually.

Did this answer your question?