analytics code fix