ClickTale Support Forums

All times are UTC - 6 hours



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: JSP integration code
PostPosted: Mon Oct 26, 2009 5:21 am 
Offline

Joined: Wed Mar 25, 2009 7:17 pm
Posts: 213
We have a new code which offers sites with JSP architecture the ability to easily record session cookies. This code will enable to get the data stored in these cookies, which helps identify your visitors (and changes the content of parts of your site accordingly). Instead of the bottom part of the tracking code, please place the following code:

Code:
<!-- ClickTale Bottom part -->
<div id="ClickTaleDiv" style="display: none;"></div>
<script src="http://s.clicktale.net/WRb.js" type="text/javascript"></script>
<script type="text/javascript" src="http://s.clicktale.net/FetchFromWithCookies.js"></script>
<script type="text/javascript">
FetchFromWithCookies.setFromCookie("JSESSIONID");
// add a similar line for each additional cookie variable

ClickTaleFetchFrom = FetchFromWithCookies.constructFetchFromUrl();

if(typeof ClickTale=='function') ClickTale([!YOUR PARAMETERS!]);
</script>
<!-- ClickTale end of Bottom part -->

Please note:

1. After
Code:
FetchFromWithCookies.setFromCookie("JSESSIONID");

more lines in the form of:
Code:
FetchFromWithCookies.setFromCookie("[!COOKIENAME!]");


Are probably needed, where [!COOKIENAME!] is the name of other session cookies required to properly identify your website visitors.

2.This code is not https/SSL compliant. To enable the recording of https pages (available to premium subscribers) you need to generate an https/SSL tracking code for your project and augment that code's bottom part similarly to the code appearing here (i.e. none of the original code is removed - only some lines are added). The WRb.js and FetchFromWithCookies.js files will have to be hosted locally as well.


Top
 Profile  
 
 Post subject: Re: JSP integration code
PostPosted: Thu Nov 05, 2009 6:18 am 
Offline

Joined: Thu Nov 05, 2009 5:37 am
Posts: 2
We use PHP integration. Can we use this script as well?

We have a 5-steps Java booking engine. When a visitor goes to the next step, the session is expired. Hope this solution helps.


Top
 Profile  
 
 Post subject: Re: JSP integration code
PostPosted: Thu Nov 05, 2009 12:57 pm 
Offline
Site Admin

Joined: Fri Jul 21, 2006 2:39 pm
Posts: 1206
Location: Israel
Hi pieter,

There is no need to use FetchFromWithCookies if using the PHP Integration module. The module caches the correct HTML for php pages with no need for cookie collection.
How do you use both Java and PHP? Perhaps your java pages are not covered by the PHP Integration module.

Regards,
Arik.


Top
 Profile  
 
 Post subject: Re: JSP integration code
PostPosted: Fri Nov 06, 2009 4:17 am 
Offline

Joined: Thu Nov 05, 2009 5:37 am
Posts: 2
Hi Arik,

With the Javascript it didn't work at all. After the PHP integration it's better, but if a visitor goes to the next page I get a message that the session has expired.

Tried many things, but I'm afraid we can't get it to work. I think the booking engine is just too complicated.

Our whole website is built in PHP, except for our new booking engine, that one is build in Java.

http://www.roompotparcs.com/holidaypark ... e=20100106

If you click a price here you go to the booking engine.

I will have to check with our web developers how they implemented this PHP code.


Top
 Profile  
 
 Post subject: Re: JSP integration code
PostPosted: Sat Nov 07, 2009 4:28 am 
Offline
Site Admin

Joined: Fri Jul 21, 2006 2:39 pm
Posts: 1206
Location: Israel
Hi Pieter,

In that case, use both solutions. The PHP integration module on PHP pages, and the JSP code on your java pages.

Regards,
Arik.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group