Fix logic to hide/show analytics