[major] add cortex as dependency and fix analytics