swapped initiation of store and analytics to allow the analytics to use local storage