Added analytics code