Refactor Google Analytics