New analytics code and put all alerts in dialog