move Google Analytics logic out of swordpush