Added analytics code and library