Thanks Adrian
I have implemented the same. It now works well.
Also is possible to use some API and fetch transcript back to the website
after the chat gets over or if the chat gets disconnected?
LivePerson Community
Custom Variable implementation in ASP.NET
reply from Adrian E. in Answers - View the full discussion
Looks like this is one of two issues
1 - The variables do not have values. Most likely in this case if a
variable does not have a value it will be replaced with NULL or an empty
value.
2- Your syntax is incorrect. You might be including the variable within
quotation marks and as a result your ASP server is not recognizing them as
variables but is displaying them verbatim.
I looked at your site and noticed that you are currently trying to use
JavaScript to pass values through. I made some minor changes to the code
to show how to combine between HTML code and JavaScript variables. The
altered code is in red
var logged = 'True';
var prod = 'Apex';
var BP = '12345';
// -->lpMTagConfig = { 'lpServer': "server.iad.liveperson.net", 'lpNumber':
"XXXXXXXXX", 'lpProtocol': (document.location.toString().indexOf('https:')
== 0) ? 'https' : 'http' }; function lpAddMonitorTag(src) { if (typeof
(src) == 'undefined' || typeof (src) == 'object') { src =
lpMTagConfig.lpMTagSrc ? lpMTagConfig.lpMTagSrc : '/hcp/html/mTag.js'; }
if (src.indexOf('http') != 0) { src = lpMTagConfig.lpProtocol + "://" +
lpMTagConfig.lpServer + src + '?site=' + lpMTagConfig.lpNumber; } else {
if (src.indexOf('site=') < 0) { if (src.indexOf('?') < 0) src = src + '?';
else src = src + '&'; src = src + 'site=' + lpMTagConfig.lpNumber; } };
var s = document.createElement('script'); s.setAttribute('type',
'text/javascript'); s.setAttribute('charset', 'iso-8859-1');
s.setAttribute('src', src);
document.getElementsByTagName('head').item(0).appendChild(s); } if
(window.attachEvent) window.attachEvent('onload', lpAddMonitorTag); else
window.addEventListener("load", lpAddMonitorTag, false);
if (typeof (lpMTagConfig) == "undefined") { lpMTagConfig = {}; }
if (typeof (lpMTagConfig.sessionVar) == "undefined") {
lpMTagConfig.sessionVar = []; }
lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length] = 'Logged=
'+logged;
if (typeof (lpMTagConfig.pageVar) == "undefined") {
lpMTagConfig.pageVar = []; }
lpMTagConfig.pageVar[lpMTagConfig.pageVar.length] = 'Product='+prod;
if (typeof (lpMTagConfig.visitorVar) == "undefined") {
lpMTagConfig.visitorVar = []; }
lpMTagConfig.visitorVar[lpMTagConfig.visitorVar.length] = 'BpNumber=
'+BP;
Notice that before I enter a JavaScript variable, I close the code with
'+ and then I add the JavaScript variable as you have defined it.
Reply to this message by replying to this email -or- go to the message on
LivePerson Community
Start a new discussion in Answers at LivePerson Community
For our email disclaimer please visit http://www.asianpaints.com/disclaimer.aspx#email
Message was edited by: Adrian E.