Updated analytics code for event