Final review Ifs unit.
Fix some analytics bug