old analytics code