Updated analytics code to use the new style.