changed analytics code