Made analytics work with ui-router