rename environment variables, refactor GA function