updated ga.js to analytics.js

As we moved to the new tag manager we moved to the new Google Analytics
which has a different javascript API.

Several issues were caused by this change while not adequately
counteracting them with code, this fixes them.

Closes #325! Closes #327!