Initial analytics code