Classic ASP integration code

From ClickTale Wiki
Jump to: navigation, search
ClickTale Wiki
The instructions on this page are intended for self service accounts.
Enterprise customers should contact their account managers for integration support.

The Classic ASP integration code allows you to record dynamic pages and pages behind a login, using the FetchFromWithCookies method.

Important note!

If your website is built with Classic ASP, but is running on a .NET server, then we recommend that you use the ASP.NET integration module for your site. Please start with the "Classic ASP integration module" article.


Integration with third-party applications

Please use the Volusion integration method if you are using Volusion on your website.

Classic ASP integration code

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 Classic ASP 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://cdn.clicktale.net/WRe.js'%20type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
ClickTaleFetchFromWithCookies.setFromCookie(/^ASPSESSIONID.*/);
// 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 Classic ASP code

This code will record HTTPS/SSL pages 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://clicktalecdn.sslcs.cdngc.net/www/':
  'http://cdn.clicktale.net/')+
 "WRe.js'%20type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
ClickTaleFetchFromWithCookies.setFromCookie(/^ASPSESSIONID.*/);
// 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(/^ASPSESSIONID.*/);
more lines may be needed, in the form of:
ClickTaleFetchFromWithCookies.setFromCookie("[!COOKIENAME!]");
where [!COOKIENAME!] is the name of other session cookies required to properly identify your website visitors.