JavaScript Deployment Troubleshooting

   

JavaScript data collection in ClickTracks can fail for several reasons. It is vital to carefully and methodically check every item below.

 

First, the definitive check for whether the page is correctly captured is whether the page appears in the site overview - top pages. You may need to expand the number of rows displayed in the Site Overview report and search within the page. Consider also if the URL contains parameters that have been masked - the report will display the version without the masked parameters.

 

JavaScript is incorrectly pasted into the page. A very common mistake is to use an email program to send the script to a system administrator. When you copy from the ClickTracks script page and paste into email, the email program inserts line breaks in the middle of the script. The result is no longer legal JavaScript syntax, so it doesn't get executed in the browser, so the data doesn't collect. If you must send the script to someone else, either have them check for line breaks and spaces, or copy/paste the script into Notepad, save the text and then send that as an attachment. The email program can't mangle the contents of an attached file.

 

JavaScript pasted into illegal parts of the page. The script goes inside the BODY tag, not inside the HEAD tag. It also cannot sit inside a TABLE tag.

 

Incorrect i= or d= parameters. These specify the dataset and the domain. The i parameter is essential. The d parameter is used only if the pages live inside a domain other than the default (first) dataset in the JDC, ie the domain is not an alias of an existing domain, but is to be viewed distinctly.

 

Changes made to the JDC dataset configuration (such as adding a domain alias) when the newly updated script has not been placed into the pages.

 

HTTPS pages where the script does not dynamically switch between HTTP and HTTPS. The default ClickTracks script does this correctly, but if you modified the script in an attempt to 'simplify' it, you should carefully check that HTTPS pages call the JavaScript using HTTPS. Failure to do this results in a visible security warning to the user in their browser, and they often click the cancel button in the warning which causes the JavaScript to be bypassed.

 

HTTPS pages where the JDC does not have a certificate installed. The browser throws a security warning and the user clicks cancel, so the script is not executed.