This study demonstrates that realizing the correlation between in situ crystallographic structure modifications of an electrochromic material and its functionality leads to improved performances, which can then contribute to a variety of energy-efficient applications.