Fix event tracking for universal analytics - Fixes #721.

This copies the event tracking behaviour from old analytics to universal analytics.

Note: I also fixed some jsHint problems, like missing comma's and comparing to zero with only two equal signs.