Added analytics code.