updating analytics code