Modified analytics code