GZO/IZO semiconductor thin films were prepared on the ITO substrate via sol-gel spin coating method for using in the dye-sensitized solar cells (DSSCs). For this purpose, GZO and IZO thin films were optimized by the percentage of doping gallium and indium in zinc oxide and were studied their electrical, optical and structural properties. After that, the layers with the best performance were selected for use in the DSSCs. The concentration of all solutions for spin coating processes was 0.1 M and zinc oxide has been doped with gallium and indium, with different doping percentages (0, 0.5, 1, 2 and 4 volume percentage). So, by studying the properties of the fabricated thin films, it was found the films with 0.5%GZO and 0.5%IZO have the best performance and hence, the optimized dual-layer (0.5% GZO/0.5% IZO (GIZO)) were prepared and studied their electrical and optical properties. The synthesized optimized dual-layer film was successfully used as the working electrode for dye-sensitized solar cells. The sample with 0.5%IZO shows the 9.1 mA/cm2 short-circuit current density, 0.52 V open circuit voltage, 63% fill factor and 2.98% efficiency.