changing to the new analytics api