Consumer loyalty plays a crucial role for companies, particularly under intense competition among firms, and successfully retaining loyal customers is decisive for sustained profitability. For this reason, customer-loyalty analysis is needed to identify each customer's level of engagement with the company. Within this analysis, consumer segmentation is an essential step for grouping customers with similar characteristics so that the marketing-management process can be targeted more effectively. This study aims to segment e-commerce customers according to their behavioural loyalty and to characterise each resulting segment as a basis for differentiated marketing strategies. The segmentation employs the LRFMP model (Length, Recency, Frequency, Monetary, Periodicity), which represents customer purchasing patterns through relationship length, the recency of the last transaction, transaction frequency, total monetary value, and purchase regularity. Clustering is performed with the K-Medians algorithm, which uses coordinate-wise medians and Manhattan distance and is therefore robust to the outliers and skewness that are common in transaction data. The dataset comprises the purchase-transaction history of an e-commerce platform spanning 373 days, from which 4,712 unique customers were obtained after preprocessing. Applying LRFMP analysis with K-Medians produced four clusters, containing 1,183, 1,221, 1,206, and 1,102 customers, respectively. Interpretation of the LRFMP profiles indicates that 25.1% and 25.6% of customers (Clusters 1 and 3, jointly 50.7%) show high loyalty potential, 23.4% show medium potential, and 25.9% show low loyalty potential. The four-cluster solution attained an average silhouette coefficient of 0.608, indicating reasonably well-separated clusters.