Make analytics.setup call promise-based