Usage: 
You need a google analytics account. In this account you need to create projects and apps to track. For each app, you will have a unique tracking id, which you need to pass to the tracker in tracking-service.js.

Event tracking takes place by injecting the ‘lmisAnalyticsDirective’ tag into the corresponding element, which is called onClick.

Page tracking takes place by injecting ‘lmisPageViewReport’ in the corresponding view.

Work in progress: event categories and descriptions need to be checked and amend description if necessary.

Need to implement the exception tracker for all exceptions, by sending the exceptions data from inside a catch block, as in uomfactory.js


Notes: I chose CPA analytics over angulartics as the latter uses the ga script at the end of the body tag (or header) of the index.html, which violates SPA’s security protocols. CPA does not cache http requests for up to four hours by default as the ga (angulartics) does. I momentarily thought that http requests can be cached at a fixed time-lapse, cause of some flags i saw on the POST packet. However, i asked the authors and they told me that this can only be done with a custom implementation similar to what  we discussed in flow dock on Monday 9/06/14 with Justin and Jide.

Hope this helps!