Fix bug 936127: Add new tracking events across site.

Also removes some JavaScript that was repeated (merge error at some 
point, doh) and fixes some indentation.