Maybe something in this post will help you: GaPlugin with Ionic. Please see my comments on using ga.js.