Polypropylene (PP) films are crucial in various industrial applications, from packaging to medical products. However, a common challenge in PP manufacturing is the presence of gel-like defects. These gels are minor defects on the surface of the films that significantly affect the physicochemical, mechanical, and organoleptic properties of the films, compromising the quality of the final product. This first research focuses on developing and validating an in-line optical method to replace the international method ASTM D 3351–93. The main objective was to create a methodology that has the same scope and analytical performance as those reported by ASTM D 3351–93 in such a way that it can compete with it in terms of precision and accuracy, thus allowing end users to this ASTM, such as PP producers, PP marketers, PP film producers, among others internationally, can use this new methodology with necessary analytical support. This analytical methodology integrates the PP extrusion zones, the film processing stages, and the optical zone for reading and processing analytical data. Additionally, it has the advantage of working with a sample size that is even more representative of the population and has less human error since only one operator is required to carry out the test; this method also has much shorter response times. The developed prototype had 14 online stages that allowed representative quantities of samples to be taken and processed thermally and mechanically for ideal optical measurement. For the online method, a 6-point calibration curve is carried out at concentrations of 40, 10, 5, 2, 1 and 0 ppm for the gel or defect sizes of 200, 400, 500, 600, 700, 800 and 900 µm, showing excellent linearity where the correlation coefficient varied between 0.997 and 0.999, the limits of detection (LOD) varied between 0.85 and 2.61 and the limits of quantification (LOQ) ranged between 2.82 and 8.71. The statistical analyzes by ANOVA of the comparison between the ASTM D 3351–93 method and the proposed simultaneous method indicate that the p value of the evaluation of the means was 0.946, which suggests that the means are not statistically different. To complement, the Tukey test was carried out at 95 %, indicating that the methods have statistical equivalence.•Process optimization•Determination of defects or imperfections in PP films