New More Than Just Live Chat — Announcing Facebook and Twitter Integration in Comm100 Live Chat >> ×

What’s Custom Variable and how to set it up?

March 1st, 2016 | Settings & Customizations

What’s Custom Variable?

Custom Variable is an advanced feature in Comm100 Live Chat that enables you to read visitor information from your website and pass it to your live chat system. This enables you to know visitors’ identity without asking, learn their specific behaviors on the website and identify target visitors. You can proactively invite target visitors to chat, provide personalized chat service and improve chat efficiency.

Technically, Comm100 Live Chat Custom Variable uses HTML Document Object Model (DOM) or JavaScript variables to read information on your website. To utilize custom variables, you need to have that content/information on your website already, and then specify the DOM or JavaScript variable expression in Comm100 Live Chat to read that content/information to your chat console.

Set Up Custom Variable by DOM

You can locate the DOM elements using a set of selectors, such as ID, tag name and class. For example, if you have visitor’s name on your website defined by ID, the expression you need to set in Comm100 Live Chat would be document.getElementById(‘visitor-name’).innerText.

Set Up Custom Variable by JavaScript Variable

If your visitors’ information is defined by JavaScript variables, the expression should be set according to your own JavaScript variables. For example, you have a JavaScript variable on your website telling your visitors’ email:

   <script type="text/javascript">
   var MyCompany_Variable_Email="email";
   </script>

In such case, you can set the expression in your Comm100 Live Chat control panel accordingly as MyCompany _Variable_Email.

After you successfully set up custom variables in your Comm100 Live Chat account, content/information of the custom variables’ expressions will be captured and passed to Comm100 Live Chat.

Set Up Custom Variable by Retrieving QueryString from URL

You can retrieve the values from the dedicated Chat Window URL which is not JavaScript based. Read more info on How to set Custom Variable Value?

Where to Set It Up?

  1. Log into your Comm100 account;
  2. Click Integrations & API at the left menu;
  3. Click Custom Variables;
  4. Enable Custom Variables and click New Custom Variable;
    Create Custom Variables
  5. Type in a name for you to recognize the information in the Variable Name box, choose the variable type, enter the expression of the custom variable in the Value box and set the Hyperlink if needed;
    Name and Value for Custom Variables
  6. Hit Save. Now you’ve got everything ready and you can directly see your visitors’ information on your chat console. (Below shows a sample screenshot of where agents can see the custom variables in VM.)
    See Visitor Info in Custom Variable Section