added offline support and analytics for apps