Use typeof to detect Universal/Classic Analytics
Check that a link href is present *and* not "#"
Syntax and commenting improvements