Feature/offline-analytics

updated version, with Tom's comments. I merged trackingService's functionality into trackingFactory.