ASP.NET integration code

'''If possible, use the ASP.NET integration module instead. It provides better integration with our service. The only reason to use this code is if you are unable to install a binary module on your site.'''

If your ASP.NET web site uses sessions (storing data in the Session[] object) or .NET's built-in Forms Authentication then ClickTale may not be able to record your pages correctly by default. This code will provide you with an ASP.NET "Web User Control" that will not only allow you to add ClickTale easily to your pages, but will also allow ClickTale to do correct caching of "session" dependant and "Forms Authentication" protected pages. This sample was developed and tested for ASP.NET 2.0. It won't work with ASP.NET 1.x because the cookieless="AutoDetect" attribute is not supported prior to ASP.NET 2.0.

Step 1
Modify your web.config file to allow cookieless session and authentication modes. Find your system.web/authentication/forms tag and add an attribute that looks like this: cookieless="AutoDetect". Find your system.web/sessionState tag and add cookieless="AutoDetect" attribute too. If you don't have one of those tags then you might be not using session or Forms Authentication or you may be using the default values. Add the tags when needed. Here is an example of an XML snippet:

Step 2
Save the following block to the root of your website as ClickTale.ascx file

You will need to insert your IDs and parameters in the bottom of the file. You should compare the code in the sample to the code you regularly use. Your code may be newer or better so you might want to edit the file to match. Make sure you keep this line: It is the one that does the magic.

Step 3
Add the "ClickTale Web User Control" to your pages. You can do that individually for each file or you can add the control to your master template (recommended). To do that, add the line at the top of your ASP file and right before your tag.

Summary
This add-on will allow ClickTale to impersonate the original visitor when caching the content. Implementing this process might have side effects on your site if you perform actions on GET requests. For example, if you keep a counter in your Session object which you raise for every page visit then you will now be getting an additional visit for every page that ClickTale is going to record. Generally you shouldn't have any such cases, but if you do you should check if ClickTale is making the request or a real person and handle properly. You can check that by looking for "ClickTale" in the UserAgent of the request.