Updated analytics code

and typo!