add test for api/analytics
improve test coverage
improve gaze performance