Help talk:CTFFWC Versions

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.

Using ClickTaleFetchFromWithCookies
 For each cookie you would like to simulate, add the following line: Where [!COOKIENAME!] is replaced with the name of the cookie. Please note: The parameter setFromCookie can be either a String or a RegExp (Regular Expression), in order to accommodate cookies with a varying name. For example: Can be used for recording cookies which are named "ASPSESSIONID" + an alphanumeric code, unique for each visitor.   Finally, after the last cookie name (and before the line that starts with "if(typeof ClickTale=='function')"), add the code line:   See here for Code_Examples

Placing the ClickTaleFetchFromWithCookies code
If you have code version 1, click Expand to see the instructions for placing your code.

If you have code version 2, click Expand to see the instructions for placing your code.

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: