update analytics code