tidy and add analytics