Proper analytics code