The first part of this paper describes in detail the electrochemical synthesis of polypyrrole (PPy) films monitored by electrochemical quartz crystal microbalance (EQCM). These films are either doped only with a Keggin-type heteropolyanion (HPA), SiMo12O40 4−, or co-doped with such polyanions and sulphate ions. It is evidenced that this HPA catalyses the electropolymerisation of the pyrrole since it is able to oxide pyrrole monomer, and on the other hand, that HPAs are definitively entrapped into the polypyrrole film as shown by their electrochemical response. All the PPy film is electroactive. When the co-doped film is obtained by potentiodynamic method, its anion composition is not homogeneous in depth, there is a concentration gradient of the doping anions. In the second part of this paper, the morphology of the films is shown as well as their electrochemical characterisations that were carried out by EQCM in order to focus on the charge compensation process that occurs during SiMo12 reduction and re-oxidation. In a wide domain of potentials, only the HPA response is observed, the polymer remains in its conducting form. The SiMo12O40 4− doped PPy films are cationic films. When several types of cations are present in the medium, the influence of the pH on the nature of the cations implied in the charge compensation that occurs during SiMo12 reduction and re-oxidation is important. When the PPy film is co-doped, it is possible to obtain a mixed PPy film. Another important finding is the stability of trapped SiMo12 ions in contact with solutions of pH higher than 4, on the contrary to what occurs when they are in solution.