The solution to tracking page views and events in a SPA with AngularJS