update to new analytics code