Feature/offline-analytics

updated version, with Tom's comments. I merged trackingService's functionality into trackingFactory. 
This still needs to be merged?