On our website, we're saving the customer's initial referrer URL (the very first page the customer lands on) into a session cookie.
In a chat.js file, invoked when the customer clicks on our "click to chat" link, we're reading that cookie and assigning it to a "rurl" variable. Then we make this call:
window.open('/gg/popup/chat.html?referrer='+escape(rurl),'chat69971338','width=472, height=320,resizable=yes,scrollbar=yes');
In the chat.html file that gets called we then have this code:
<!-- BEGIN LivePerson Monitor. -->
<script type="text/javascript">
var lpMTagConfig = {'lpServer' : "server.iad.liveperson.net",'lpNumber' : "69971338",'lpProtocol' : "https"}; 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);
$(window).load(function() {
setTimeout(function() {
}, 1000) });
</script>
<!-- END LivePerson Monitor. -->
The problem is that the cookied referrer url data (that was in the rurl variable invoked in chat.js call to chat.html) is not getting into the LivePerson Agent Console session as the Referrer. How do we take our cookied data and make sure to pass it correctly into LivePerson as the Referrer URL?
Thanks for your help. We're at wit's end trying to get this to work properly.
/Jason