Recognizing the importance of keeping customers, organizations are looking for ways to keep them. Customers will be loyal to the organization when the organization knows their expectations and acts to meet their needs. The concept of service quality considers the need to pay attention to the needs and wishes of customers in order to achieve customer loyalty. The aim of the current research is to investigate the relationship between the quality of electronic services and electronic loyalty due to the mediating role of "electronic satisfaction", "perceived value" and "electronic advisory ads". The present statistical study of customers of online stores in Tehran. The research is of a descriptive type and to collect the necessary data from the questionnaire and to measure the validity of the questionnaire, the mean of the extracted variance was used and to determine the reliability, the combined reliability method was used. After a thorough review of the theoretical foundations and the selection of statistical sample members by distress sampling, a questionnaire was used to collect the necessary data, and due to the unknown nature of the population, 384 questionnaires were prepared and distributed, and then the information was collected and measured using the structural equation method and pls software. The results show that the quality of electronic services directly and indirectly affects customer loyalty, and its indirect effect (0. 633) is more than the direct effect (0. 269),Moreover, e-satisfaction is known as the most important factor in creating loyalty among customers.