ClickTaleFetchFromWithCookies

ClickTaleFetchFromWithCookies is an extension to the regular ClickTale tracking code that allows correct caching of pages that depend on cookie values. The cookies could contain session identifiers (session cookies) or simple values. The values collected during recording time will be passed to your server during the caching (AKA fetching) stage. Your server would then recognize a visitor's session on your website and render the page content accordingly (e.g. display a shopping cart's contents). This script is used in several integrations, including those for Classic ASP and JSP.

If you are hosting an older version of the recorder file (before WRc3.js) and for some reason unable to update it, please use Old FetchFromWithCookies.


 * If you want to keep your locally hosted recorder file up-to-date, please read this article.

Using ClickTaleFetchFromWithCookies
Add the code lines according to your Tracking Code type:

If you have code type Atlas, click 'Expand' below to see the instructions for placing your code. Click 'Collapse' to close the section.

If you have code type Balkan, click 'Expand' below to see the instructions for placing your code. Click 'Collapse' to close the section.

Forcing a specific cookie name/value
There may be cases in which you would like to specify the cookie value yourself. For example:  You want the ClickTale bot to arrive with a cookie that is an HTTPOnly cookie (you may want to consider using an Integration module in this case).  You want to force the ClickTale bot to arrive with a special cookie name + value, rather than take the name and value from the visitor.  You want to make the ClickTale bot arrive with a predefined cookie name + value that the visitor does not have.   In such cases, you should use the following API property: Where: [!COOKIENAME!] - String, name of the cookie to pass to the ClickTale bot. [!COOKIEVALUE!] - String, value of the cookie to pass to the ClickTale bot.

Specifying a URL
Much like the ClickTaleFetchFrom variable, the ClickTaleFetchFromWithCookies also enables you to define where to fetch the page html from (a different source than the page the code is located on). This is done by entering the URL as a parameter in the constructFetchFromUrl function: This can come in handy for instance when employing the ClickTaleFetchFrom solution for POST pages (noted here).

Using in conjunction with an integration module
Since integration modules have an xml file which is used as a centralized source for the tracking code, the ClickTaleFetchFromWithCookies should be implemented there. The addition of ClickTaleFetchFromWithCookies is done similarly to the way it's added to regular tracking code, with one exception. Since the code in the xml already includes a ClickTaleFetchFrom line, the URL in it should be used in the constructFetchFromUrl command instead. For example, The code in the ClickTaleScripts.xml file for the ASP.NET integration module contains the line: When adding the ClickTaleFetchFromWithCookies code the list of cookies added using setFromCookie is placed normally, while the ClickTaleFetchFrom line is changed to: