refactored Google Analytics code into a partial