Version 8WR8.js and up
Functionality set 1 - The Main setA main set of functions and variables is available right after the inclusion of ClickTale's main script which looks similar to this:
<script src="http://s.clicktale.net/WRx.js" type="text/javascript"></script>
ClickTale(ProjectID,RecordingRatio[,PartitionID])This is the main function of ClickTale and is part of the auto-generated code. ClickTale initiates a process of recording a visitor by checking for a supported browser and deciding if the visitor should be recorded based on the "recording ratio" parameter passed. Once all tests are successful, this method will load additional code to perform the recording itself. PartitionID is an internal ClickTale value determining where data will be stored. Similarly to ProjectID, PartitionID should match the value that is generated for you by our tracking code generator.
ClickTaleIsPlayback()This function returns 'true' when the page is in 'Playback mode' You may want to detect this condition and branch your code accordingly if some parts of your in-page javascript code are incompatible with the playback mechanism. Don't check against "false". Use "!ClickTaleIsPlayback()" instead.
ClickTaleTag(Tag)This function allows you to add a tag to the current recording. Tags allow you to identify recordings when browsing for them in the subscriber's area.
ClickTaleNote(Note)This function allows you to add a note to the current recording. Notes are strings of text that will appear during the playback of the recording.
ClickTaleField(Field,Value)This function allows you to add a Field-Value pair to a recording. This pair will be available during the playback of the recording.
ClickTaleIgnore(Days)This function allows you to mark the current visitor as not-to-record for at least a period of 'Days' days.
This will not affect existing or in-progress recordings (see ClickTaleStop() ).
ClickTaleCookieDomainThis variable contains the domain name on which the visitor-id cookie will be stored. By default the value is the current domain (minus the www. if present).
If you want to aggregate monitoring of several sub-domains (such as blog.x.com, x.com and
http://www.x.com), set this variable to the name of your top level domain (x.com) before the call to the ClickTale() function.
ClickTaleUnloadPauseClickTale performs a pause before allowing the document to unload. This pause is required to allow the last packet of information to be sent. The default recommended value is 500ms. Increasing the value of this variable will reduce the number of corrupt recording but will increase the exit time of pages. You can set another positive value if you prefer.
WRUID cookieClickTale will store the visitor's id in this cookie. A value of 0 means 'don't record' and any other value identifies the visitor. Lack of this cookie means that the visitor has not yet been classified by ClickTale() or that he is unsupported.
Functionality set 2 - The Recording setThe second set of functions, the 'recording set' becomes available once a recording is running. You may want to check whether the recording set was loaded by using a line similar to this:
if(typeof ClickTaleStop=='function')
ClickTaleStop()This function stops the recording while preserving what has been recorded up to this point.
Recording can not be resumed for this page-view after a 'stop'
ClickTaleTerm()This function stops the recording while deleting what has been recorded up to this point.
Recording can not be resumed for this page-view after a 'terminate'
Inline variantsWhen you need to use the API functions before the scripts are loaded, you can use these inline variants instead:
inline ClickTaleIsPlayback()Code:
function CTIsPlayback() {
try { return parent && parent.WebPlayer; }
catch(e) { return false; }
}