This paper develops a new framework for the interpretation of impedance or capacitance spectroscopy of ion insertion processes in thin film electrodes, with a particular emphasis in electrochromic materials. The model distinguishes types of inserted ion charge regarding the energetics and kinetics properties of ion storage sites. The ion charge in a connected network of sites moves rapidly (fast sites) and is distributed according to equilibrium thermodynamic properties, while slower sites trap the ions and provide a variety of kinetic behaviors that dominate the response in the long time scale. We show that the assumption that a fraction of the intercalated ions have been immobilized at certain sites, and do not participate in diffusion, provides a suitable explanation for the observation of different capacitive components in the faradaic impedance of homogeneous systems (fast and slow charging modes). Moreover, ion trapping contributes a resistive component to the impedance, related to homogeneous charge-transfer between different types of sites (trap resistance). The model predicts an arc in the complex capacitance representation associated to the solid-state reduction step involved in the coloration by electroinsertion. The characteristic features of the relaxation in structurally disordered materials are studied in the kinetic framework of a multiple trapping scheme. We show that a wide distribution of trapping times provides a power law of frequency, which relates to the frequent observation of a constant phase element (CPE) impedance.