fixes js semicolons and adds analytics tracking  for unit