fixed analytics code. :(