work in progress: add analytics