Working on analytics code