The study of the factors affecting consumer buying behavior in online environments is taking on a more detailed form every day. For this purpose, the present study was conducted with the aim of prioritizing the factors affecting consumer buying behavior in online social media marketing. The analysis and validation of indicators were done using the combined method of structural equation modeling and partial least squares. In addition, in order to determine the importance and type of performance of each factor, the IPMA matrix was used. The research data was influenced by consumer information, which mostly included women with a master's degree and in the age range of 36 to 50 years, using the available non-probability sampling method that is common for online surveys, and using Cohen's effect size formula, 466 people were examined. The findings of the research showed that the factor of consumer engagement has the highest degree of importance and ease of use has the highest level of performance in the general model of social media. In addition, the factor of consumer engagement has the highest degree of importance, and electronic word-of-mouth (EWOM) has the highest level of performance in Instagram, and vice versa, EWOM is the most important, and consumer engagement has the highest degree of performance in Telegram. These results can be used by marketers to influence consumer buying behavior and in online marketing plans in their desired direction.