LivePerson, Inc.
Live Person: leader in live chat for live help support, customer service and sales
Search
Login to Live Chat, email management and response

Live chat
Send an email
Search FAQs

Account Number:

User Name:

Password:

» Forgot your password?

Tags for Tracking Variables

Overview

With Tracking Variables, you can present important, business-specific data that will help your online operators in selling and servicing your customers. You can choose to display this data for each visitor or only for visitors who request a call. Any web-accessible information from your website or databases can be used as tracking variable, for example user login , shopping cart value, marketing campaign data.

In LivePerson Enterprise solution, tracking variables can be used in conjuction with Operator Alerts to display special messages to the online operators. Operation and Business Report are also available to generate comprehensive analysis of Tracking Variables.

 

Example of Application

User Login

A tracking variable can be set to capture the username or/and account number of customer. The online opoerator can now identify the visitor without having to ask him any questions and without the need of a pre chat survey.

Shopping Cart Value

Tracking Variables can be set to capture the contain of a shopping cart as well as the cart total value.

Marketing Campaign

You can use tracking variable to identy visitors coming from your online marketing campaigns.

 

Display of Tracking Variables

Tracking variables are displayed in the Operator interface in the Info tab

 

Scope

There are three different types of Scope: Visitor, Session and Page.

Scope Description

Visitor Scope

The value assigned to a particular visitor. Only one value of the variable is stored per unique visitor. The value is “visible” in all sessions by the same visitor.  Example: Username

Session Scope

The value associated with a particular visitor session. Only one value of the variable is stored per session.  Example: Shopping Cart Total

Page Scope*

The value associated with a specific page in the navigation sequence. A session can contain multiple values for the same variable.
Example: Keywords used for an internal search

*Note: Page scope can only be used with accounts which have the LivePerson's Business Reports feature available.

 

Formatting Tag Variables

The general format for a CustomVariable Tag when embedded in HTML is as follows:

Scope Format Example

Page Scope

PAGEVAR!<name>=<value>

PAGEVAR!Keyword=digital+camera

Session Scope

SESSIONVAR!<name>=<value>

SESSIONVAR!Item1=Canon+A20

Visitor Scope

VISITORVAR!<name>=<value>

VISITORVAR!Name=John

Spaces or special characters in the name or value pair should be encoded in order to avoid errors in Netscape.  For example spaces should be replaced by the character "+". To avoid any loss of data we recommend escaping all the value of the custom variables. Click here for more information.

 

Embedding Custom Variable Tags

Custom Variable Tags can be embedded in a Chat Button Tag or Monitor Tag or both.

Embeded in Scope supported Display in the Monitor

Button Tag

Session
Visitor

Only for chatting Visitors

Monitor Tag

Session
Visitor
Page

For all visitors

The following examples demonstrate how a custom variable tag can be used to retrieve information from various sources and present them through the LivePerson interface. However, as every source and database is different, there could be differences between the way we present information below and how it needs to be coded for your application. Please contact LivePerson with any questions at LivePerson support: techsupport@liveperson.com

 

Embedding Custom Variables in the Chat Button Tag

To embed the tag variables, you add them as query parameters to the target URL within the tag. Separate the variables with the ampersand (&) character.  Adding the tag variable in the onClick statement (Red) is required. Adding it to the URL (Blue) is optional, and is only necessary for browsers which do not support JavaScript. This is for example the case of most email client including (Outlook XP).

Note: You cannot set a page scope variable from this tag.

Example:

In the example below, we are pulling the user identification from the customer database and product from the shopping cart, embedded in the Button Tag:

<!-- BEGIN LivePerson Button Code -->
<a href='http://server.iad.liveperson.net/hc/12345678/?cmd=file&file=visitorWantsToChat
&site=12345678&byhref=1&VISITORVAR!userid=8787&SESSIONVAR!product=camera'
target='chat12345678' onClick="window.open('http://server.iad.liveperson.net/hc/12345678/
?VISITORVAR!userid=8787&SESSIONVAR!product=camera&cmd=file&file=visitorWantsToChat
&site=12345678&referrer='+document.location','chat12345678','width=472, height=320');
return false;"><img src='http://server.iad.liveperson.net/hc/12345678/?cmd=repstate&site=
12345678&category=en;liveperson;1&ver=1' name='hcIcon' width=120 height=36 border=0></a>
<!-END LivePerson Button code -->

Note: replace the account number "12345678" from the example with your own account number.

 

Embedding Custom Variables in the Monitor Tag

To embed the CustomVariable Tags, you need to add a script block containing the tag variables immediately before the monitor tag code. The script block must define a variable named "tagVars" which must be assigned the tag variable string.

Example:

In the example below, we are pulling the user identification from the customer database and product from the shopping cart, embedded in the Monitor Tag:

<script language="javascript">
var tagVars = 'VISITORVAR!userid=8787&SESSIONVAR!product=camera';
</script>

<!-- BEGIN LivePerson Monitor. DO NOT MOVE! MUST BE PLACED JUST BEFORE THE /BODY TAG -->
<script language='javascript'
src='http://server.iad.liveperson.net/hc/12345678/x.js?cmd=file&file=chatScript3&site
=12345678&category=en;liveperson;2'> </script>
<!-- END LivePerson Monitor. DO NOT MOVE! MUST BE PLACED JUST BEFORE THE /BODY TAG -->

 

Escaping the Value of Custom Variable

In order to prevent loss of data as well as problems with Netscape 4, we highly recommend using the JavaScript "Escape" method. This method called "escape" will replace all special characters with code. The request is automatically unescaped when it is received by our servers.

Here is an example:

'VISITORVAR!userid='+escape('8787')+'&SESSIONVAR!product='+escape('Digital Camera F@747')

 

Special Custom Variables

Some custom variables have been pre-defined in the LivePerson application in order to provide easy access to system parameters. These custom variables can be set either in the button tag or the monitor tag.

Note: All the special custom variables are lower case. Custom variables are case sensitive.

The  "identifier" custom variable

This custom variable enables access to the parameter used for displaying the name of the visitor in the chat window. By default this name is "You". The value of the identifier variable can be set either through the pre chat survey or through custom variables.

Example: SESSIONVAR!identifier=John

The "operator" custom variable

This custom variable routes calls to a specific operator. It can be used for example to establish an operator directory. The operator name should be exactly as defined in the administration area (case sensitive).

Example: SESSIONVAR!operator=John+Smith

The "skill" custom variable

This custom variable routes calls to a specific group of operators defined with the skill feature. The value of the skill variable can be set either through the pre chat survey or through custom variables. The skill name should be exactly as defined in the administration area (case sensitive).

Example: SESSIONVAR!skill=Customer+Support

If you would like the "Click To Chat Button" to reflect the state of a specific skill (Online or Offline), add the custom variable in the image URL.

Example:

<!-- BEGIN LivePerson Button Code -->
<a href='http://server.iad.liveperson.net/hc/12345678/?cmd=file&file
=visitorWantsToChat&site=12345678&
byhref=1&SESSIONVAR!skill=Technical+Support' target='chat12345678'
onClick="window.open('http://server.iad.liveperson.net/hc/12345678/
?SESSIONVAR!skill=Technical+Support&cmd=file&file
=visitorWantsToChat &site=12345678&referrer='+
document.location','chat12345678','width=472,height=320');
return false;"><img src='http://server.iad.liveperson.net/hc/12345678/
?skill=Technical+Support&
cmd=repstate&site=12345678&category=en;liveperson;1&ver=1'
name='hcIcon' width=120 height=36 border=0></a>
<!-END LivePerson Button code -->