J2EE integration code
From ClickTale Wiki
The instructions on this page are intended for self service and online accounts.
Enterprise customers should contact their account managers for integration support.
The only reason to use this code is if you are unable to install a binary module on your site.
Contents |
The J2EE integration code below allows you to record dynamic pages and pages behind a login using the FetchFromWithCookies method.
Replace the bottom part of your tracking code with the one of the following to allow ClickTale to better cache the pages of your session based website:
Standard J2EE integration code
This code cannot record https/SSL pages.
<!-- ClickTale Bottom part --> <div id="ClickTaleDiv" style="display: none;"></div> <script type="text/javascript"> if(document.location.protocol!='https:') document.write(unescape("%3Cscript%20src='http://s.clicktale.net/WRb.js'%20type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> ClickTaleFetchFromWithCookies.setFromCookie("JSESSIONID"); // add a similar line for each additional cookie variable ClickTaleFetchFrom = ClickTaleFetchFromWithCookies.constructFetchFromUrl(); if(typeof ClickTale=='function') ClickTale([!YOUR PARAMETERS!]); </script> <!-- ClickTale end of Bottom part -->
https compliant J2EE integration code
This code will record https/SSL paes as well as standard pages. This functionality is not available for all plans and will not work unless supported by your current plan.
<!-- ClickTale Bottom part --> <div id="ClickTaleDiv" style="display: none;"></div> <script type='text/javascript'> document.write(unescape("%3Cscript%20src='"+ (document.location.protocol=='https:'? 'https://clicktale.pantherssl.com/': 'http://s.clicktale.net/')+ "WRb.js'%20type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> ClickTaleFetchFromWithCookies.setFromCookie("JSESSIONID"); // add a similar line for each additional cookie variable ClickTaleFetchFrom = ClickTaleFetchFromWithCookies.constructFetchFromUrl(); var ClickTaleSSL=1; if(typeof ClickTale=='function') ClickTale([!YOUR PARAMETERS!]); </script> <!-- ClickTale end of Bottom part -->
Adding more cookies
Please note: After
ClickTaleFetchFromWithCookies.setFromCookie("JSESSIONID");
- more lines in the form of:
ClickTaleFetchFromWithCookies.setFromCookie("[!COOKIENAME!]");
- may be needed, where [!COOKIENAME!] is the name of other session cookies required to properly identify your website visitors.