The fabrication of porous Si-based Er-doped light-emitting devices is a very promising developing field for all-silicon light emitters. However, while luminescence of Er-doped porous silicon devices has been demonstrated, very little attention has been devoted to the doping process itself. We have undertaken a detailed study of this process, examining the porous silicon matrix from several points of view during and after the doping. In particular, we have found that the Er-doping process shows a threshold level which, as evidenced by the cross correlation of the various techniques used, does depend on the sample thickness and on the doping parameters.