This study discusses the implementation of the K-Means Clustering method to analyze customer purchasing patterns in the PitaPita Accessories e-commerce. The main problem addressed is the absence of a structured customer segmentation, causing marketing strategies to remain generic and less targeted. This research aims to apply the K-Means algorithm to group customers based on their purchasing behavior, process transaction data into numerical attributes, and present the segmentation results as a basis for developing more personalized and effective marketing strategies. The dataset used in this study consists of 571 customer records and 571 transaction records. The analysis was conducted by constructing Recency, Frequency, and Monetary (RFM) attributes, where recency represents the time difference between the most recent transaction and a reference date, frequency represents the total number of transactions per customer, and monetary represents the total purchase value per customer. The RFM data were then clustered using the K-Means algorithm with K = 3 clusters. The results indicate that K-Means was successfully implemented in a web-based system and was able to generate customer segmentation into three clusters with distinct purchasing characteristics, reflected by the number of members and the average RFM values in each cluster. This segmentation can support decision-making for more targeted promotions, customer retention, and product offering strategies according to the characteristics of each customer group.
Copyrights © 2026