Converted Google Analytics to use localStorage