Fix overriding analytics css and simplify logic