Store Google Analytics data in localStorage when offline