Placement Considerations

   

It is important to place the JavaScript snippet correctly on the web page.  First, the snippet must be placed within the <BODY></BODY> tag, since it needs to gather data from the entire DOM.  It should NOT be placed within the <HEAD</HEAD> section of the site.

 

The snippet should be placed just above the </BODY> tag, or as close to that point as possible.  Some other web based applications provide JavaScript code to be placed in the same location.  If another piece of JavaScript code is located between the </BODY> tag and the ClickTracks code, this will probably not present any problems.  The important thing is to allow all of the page content to load without having to wait for the JavaScript to completely execute.

 

It is also important not to place the JavaScript code within a <TABLE>,<TR>, or <TD> cell.  These tags are very easy to get incorrectly formatted, and if they are, they may cause the JavaScript not to load at all.