Preprint
Article

This version is not peer-reviewed.

A Predictive SaaS System Based on GRU and XGBoost Models to Increase User Conversion Rates in Technological Retail E-Commerce Platforms

Submitted:

21 November 2026

Posted:

24 November 2026

You are already at the latest version

Abstract
E-commerce platforms in the technological retail sector face persistent challenges in transforming digital browsing traffic into completed sales due to high shopping cart and session abandonment rates (averaging 78.5% in emerging Latin American markets). While previous studies address online purchase intention through isolated static classifiers or offline sequential recommenders, few solutions integrate real-time sequential-tabular inference with immediate commercial intervention within a scalable cloud architecture. This article presents the design, cloud implementation, and empirical validation of a predictive Software-as-a-Service (SaaS) system powered by a hybrid Gated Recurrent Unit (GRU) and Extreme Gradient Boosting (XGBoost) engine to increase user conversion rates on technological retail e-commerce platforms in Lima, Peru. The methodology encompasses real-time clickstream telemetry capture, hybrid session representation combining 64-unit GRU temporal embeddings with aggregated session attributes, synthetic minority over-sampling (SMOTE) on training partitions, TreeSHAP interpretability, and deployment on an Amazon Web Services (AWS) microservices architecture featuring dual persistence in Amazon DynamoDB and Amazon RDS (PostgreSQL). Experimental evaluation demonstrates that the hybrid GRU + XGBoost model achieves an AUC-ROC of 0.937 and an F1-Score of 0.930, outperforming standalone sequential and tabular baselines while maintaining an average end-to-end inference latency of 0.43 s (430 ms) and a streaming ingestion latency of 40 ms. Furthermore, a dual-front expert validation protocol yielded mean scores of 4.60/5.00 in the technical domain and 4.50/5.00 in the technological retail business domain, confirming the system’s mathematical robustness, low-latency scalability, and commercial viability for real-time abandonment mitigation.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

Electronic commerce has consolidated its position as a strategic revenue channel for companies in the technological retail sector, particularly in rapidly expanding urban digital markets such as Lima, Peru [1]. According to e-commerce research institutions and industry benchmarks, despite sustained growth in digital visitor traffic, online retailers consistently struggle to convert browsing sessions into completed sales due to severe shopping cart and session abandonment rates, which average 78.5% across specialized consumer electronics, computer hardware, and telecommunications stores [6,12]. Unlike general apparel or grocery segments, consumers shopping for technological products exhibit complex, multi-stage decision-making journeys: they compare technical specifications across multiple stock-keeping units (SKUs), verify component compatibility, evaluate financing alternatives, repeatedly modify shopping carts, and frequently abandon the platform prior to checkout completion [3]. Consequently, technological retail enterprises require intelligent systems capable of decoding behavioral signals during an active browsing session and executing automated commercial responses before abandonment occurs [7,11].
Clickstream telemetry analysis provides a granular foundation for modeling in-session user behavior by capturing chronological micro-interactions, including page views, product dwell times, specification comparisons, shopping cart additions or removals, promotional banner clicks, and final session outcomes [18]. In this regard, the study by Tokuç and Dag indicates that combining historical session summaries with recent clickstream actions significantly enhances online purchase prediction performance [6]. Similarly, investigations from specialized academic institutions have shown that supervised gradient boosting algorithms exhibit strong discriminative capability on structured e-commerce datasets [19]. Specifically, the study by Abdullah-All-Tanvir et al. evaluated ensemble classifiers for online shopper purchase intention, reporting competitive results with XGBoost, including an area under the receiver operating characteristic curve (AUC-ROC) of 0.937, an area under the precision-recall curve (AUC-PR) of 0.754, and an accuracy of 90.7% [1]. Complementary investigations by Lin and by Dritsas and Trigka confirm that tree-based boosting models excel at processing heterogeneous tabular attributes in precision marketing and consumer behavior prediction [9,12].
Nevertheless, the study by Zhou and Hudin points out that purely tabular classifiers treat session variables as static aggregates, disregarding the temporal order in which user interactions unfold during navigation [8]. From a sequential modeling perspective, research institutions specializing in artificial intelligence have demonstrated that recurrent neural networks—particularly Gated Recurrent Units (GRU)—effectively capture short- and long-term temporal dependencies within digital clickstreams while requiring lower computational overhead and fewer parameters than Long Short-Term Memory (LSTM) or heavy Transformer architectures [2,3,14]. Recent studies on session-based recommendation and multi-behavior sequence modeling by Wu et al. and Betello et al. underscore that the sequential progression of events carries essential predictive signals regarding purchase intent [4,5]. However, the vast majority of these sequential frameworks focus on offline product recommendation or isolated algorithmic benchmarks rather than real-time conversion or abandonment prediction coupled with active commercial intervention during the live session.
From an operational and business perspective, predicting abandonment risk generates tangible commercial value only when linked to immediate action and interpretable decision support [20]. Specifically, the study by Seo and Yoo demonstrated that issuing real-time customized digital coupons to hesitant shoppers prior to session exit substantially improves shopping mall revenue [7]. Simultaneously, the studies by Peng et al. and Lundberg et al. emphasize that integrating SHapley Additive exPlanations (SHAP) mitigates the “black-box” limitation of complex ensemble models, enabling commercial analysts to inspect the exact behavioral factors driving each prediction [10,15]. At the systems engineering level, architectural studies from cloud and informatics research institutions—such as those by Chen et al. and Pereira et al.—advocate encapsulating predictive pipelines within Machine Learning as a Service (MLaaS) and cloud-native Software-as-a-Service (SaaS) architectures to ensure horizontal scalability, multi-tenant security, and sub-second streaming inference [11,13].
Table 1 synthesizes the capabilities of representative state-of-the-art studies compared against the predictive SaaS system developed in this work.
Addressing these scientific and operational gaps, this full paper expands upon our preliminary conceptual design by presenting the complete mathematical formulation, cloud implementation, experimental ablation, and multi-expert validation of a Predictive SaaS System based on a hybrid GRU and XGBoost engine aimed at increasing user conversion rates in technological retail e-commerce platforms in Lima, Peru. The main contributions of this research are fourfold:
  • Hybrid Sequential-Tabular Predictive Engine: We formulate and train a dual-stage architecture in which a 64-unit GRU network encodes variable-length clickstream event sequences into dense temporal embeddings ( h T ), which are concatenated with engineered tabular session attributes and classified via regularized XGBoost to estimate real-time conversion or abandonment probabilities.
  • Low-Latency Cloud SaaS Architecture with Dual Storage: We deploy the solution on Amazon Web Services (AWS) using a microservices API secured with JSON Web Tokens (JWT), combining high-velocity non-relational streaming ingestion in Amazon DynamoDB (achieving a 40 ms ingestion latency) with ACID-compliant relational persistence in Amazon RDS for PostgreSQL to manage business KPIs, commercial alerts, and recovered revenue records.
  • Explainable AI and Dynamic Commercial Intervention: We embed TreeSHAP attributions directly into an administrative SaaS dashboard and couple real-time abandonment probability thresholds to an automated intervention engine capable of dispatching personalized offers, pop-ups, and promotional alerts within an average end-to-end latency of 0.43 s (430 ms).
  • Empirical Validation in the Technological Retail Sector: We benchmark the hybrid engine against four baseline models and execute a rigorous Dual-Front Validation Protocol with domain specialists across the Technical Front (Cloud/ML Engineering) and the Technological Retail Business Front in Lima, Peru.

2. Materials and Methods

2.1. Methodological Workflow and Formal Problem Statement

The methodological framework of this study adapts and extends supervised purchase intention pipelines [1,6] and recurrent behavioral architectures [2,3] into an operational, low-latency Predictive SaaS System tailored for technological retail e-commerce platforms in Lima, Peru. Figure 1 illustrates the end-to-end methodological and architectural workflow of the platform, and Table 2 details the seven sequential phases of the methodology.
We formulate real-time session outcome prediction as a binary classification task evaluated continuously during an active browsing session [1,4]. Let S = { s 1 , s 2 , … , s N } denote the collection of N user sessions recorded across technological retail e-commerce platforms. Each session s i is represented at any active decision step by a pair E i , x i , tab , where:
  • E i = 〈 e i , 1 , e i , 2 , … , e i , T i 〉 is the chronological sequence of T i clickstream events generated by the user, with each event vector e i , t ∈ R d e encoding the action category, normalized dwell duration Δ t , SKU price tier, and interaction context;
  • x i , tab ∈ R d s is a structured tabular vector summarizing aggregated session metrics and user context up to step T i .
The binary ground-truth target variable is defined as y i ∈ { 0 , 1 } , where y i = 1 denotes session conversion (completion of payment checkout) and y i = 0 denotes session abandonment (leaving the platform without purchasing).

2.2. Technological Retail Clickstream Dataset and Feature Schema

To evaluate the platform under realistic technological retail conditions in Lima, Peru, the empirical study utilizes a curated dataset of N = 45,000 e-commerce browsing sessions reflecting consumer electronics and computer hardware shopping behavior (laptops, smartphones, PC components, gaming peripherals, and smart home devices). Consistent with empirical industry benchmarks in the Peruvian technological retail sector, the dataset exhibits a severe class imbalance characterized by 78.5% abandonment ( 35,325 sessions where y i = 0 ) and 21.5% conversion ( 9,675 sessions where y i = 1 ). Table 3 specifies the structured tabular, contextual, and sequential variables constructed during feature engineering.

2.3. Data Preprocessing, Hybrid Representation, and SMOTE Class Balancing

Raw clickstream logs frequently contain noisy sessions caused by automated web crawlers, accidental single-click bounces, or network timeouts. During preprocessing, sessions with fewer than three recorded micro-events or missing session identifiers are filtered out. Categorical contextual features (visitor_type, traffic_source, and device_platform) are encoded via One-Hot Encoding, while continuous numerical attributes x j are normalized into the unit interval [ 0 , 1 ] via Min-Max scaling calibrated strictly on training statistics:
x i , j ′ = x i , j − min x train , j max x train , j − min x train , j .
Following the hybrid representation methodology established by Tokuç and Dag [6], each browsing session is represented simultaneously as an aggregated attribute vector x i , tab ∈ R d s ( d s = 18 post-encoding) and a fixed-length sequential tensor E i ∈ R T × d e ( T = 25 , d e = 10 ). Sessions with T i < 25 events are left-padded with zero vectors 0 ∈ R d e , whereas sessions exceeding 25 events retain the 25 most recent actions prior to the inference timestamp.
To prevent data leakage during model evaluation, the 45,000-session dataset is partitioned via stratified random sampling into a training set (70%, 31,500 sessions), a validation set (15%, 6,750 sessions), and a hold-out test set (15%, 6,750 sessions). Because the raw distribution contains 78.5% abandonment sessions, training directly on imbalanced data biases gradient updates toward the majority class [1]. We apply the Synthetic Minority Over-sampling Technique (SMOTE) [16] exclusively to the training partition. For each minority conversion instance x min in the training set, a synthetic sample x syn is generated along the line segment joining x min and one of its k = 5 nearest minority neighbors x ˜ min :
x syn = x min + δ · x ˜ min − x min , δ ∼ U ( 0 , 1 ) .
The validation and test partitions remain completely unmodified (preserving the natural 78.5% / 21.5% ratio) to guarantee a realistic evaluation of predictive generalization.

2.4. Mathematical Formulation of the Hybrid GRU + XGBoost Engine

The core algorithmic architecture integrates a Gated Recurrent Unit (GRU) neural network for temporal sequence encoding with an Extreme Gradient Boosting (XGBoost) decision tree ensemble for joint sequential-tabular classification [1,2,3,17].

2.4.1. Sequential Behavioral Encoding via GRU

Given the sequential clickstream tensor E i = 〈 e i , 1 , e i , 2 , … , e i , T 〉 , a recurrent layer comprising d h = 64 GRU units processes the event vectors sequentially across steps t = 1 , … , T . At each step t, the GRU computes an update gate z t ∈ R 64 and a reset gate r t ∈ R 64 that regulate information flow without requiring a separate memory cell state:
z t = σ W z e i , t + U z h t − 1 + b z ,
r t = σ W r e i , t + U r h t − 1 + b r ,
h ˜ t = tanh W h e i , t + U h r t ⊙ h t − 1 + b h ,
h t = 1 − z t ⊙ h t − 1 + z t ⊙ h ˜ t ,
where σ ( u ) = ( 1 + e − u ) − 1 is the element-wise logistic sigmoid function, ⊙ denotes the Hadamard product, W z , W r , W h ∈ R 64 × d e and U z , U r , U h ∈ R 64 × 64 are trainable weight matrices, and b z , b r , b h ∈ R 64 are bias vectors. The final hidden state vector h i , T ∈ R 64 summarizes the temporal trajectory and transition dynamics of user session s i .

2.4.2. Feature Concatenation and Regularized XGBoost Classification

To unify temporal patterns with static session indicators, the terminal GRU embedding h i , T is concatenated with the normalized tabular feature vector x i , tab ′ ∈ R d s to form a hybrid session representation vector z i ∈ R 64 + d s :
z i = h i , T ∥ x i , tab ′ .
The hybrid vector z i is passed to the XGBoost classifier [17], which models the log-odds of conversion using an additive ensemble of K regression trees { f 1 , f 2 , … , f K } :
y ^ i = σ ∑ k = 1 K f k ( z i ) , f k ∈ F ,
where F = f ( z ) = w q ( z ) ∣ q : R 64 + d s → { 1 , … , M } , w ∈ R M denotes the space of Classification and Regression Trees (CART) with M terminal leaves and leaf weight vector w. At boosting iteration k, tree f k is learned by minimizing the second-order regularized objective function:
L ( k ) ≈ ∑ i = 1 n g i f k ( z i ) + 1 2 h i f k 2 ( z i ) + γ M k + 1 2 λ ∑ j = 1 M k w k , j 2 ,
where g i = y ^ i ( k − 1 ) − y i and h i = y ^ i ( k − 1 ) ( 1 − y ^ i ( k − 1 ) ) are the first- and second-order gradients of the binary cross-entropy loss, γ penalizes leaf splits, and λ enforces L 2 weight regularization. For a fixed tree structure q ( z ) with leaf instance sets I j = { i ∣ q ( z i ) = j } , the optimal leaf weight w j * is given analytically by:
w j * = − ∑ i ∈ I j g i ∑ i ∈ I j h i + λ .
Table 4 summarizes the optimal hyperparameter configuration selected via 5-fold cross-validation on the training partition.

2.5. Model Interpretability via TreeSHAP and Dynamic Intervention Logic

To ensure that predictive outputs are transparent to commercial managers in technological retail, we incorporate TreeSHAP [10,15]. Given the trained tree ensemble f ( z i ) , TreeSHAP computes exact Shapley additive explanation values ϕ j ( z i ) representing the marginal contribution of feature j ∈ F to the session prediction f ( z i ) :
ϕ j ( z i ) = ∑ S ⊆ F ∖ { j } | S | ! ( | F | − | S | − 1 ) ! | F | ! f S ∪ { j } ( z i , S ∪ { j } ) − f S ( z i , S ) .
During an active browsing session, the real-time abandonment probability is defined as P aband ( s i ) = 1 − y ^ i . To convert predictions into immediate commercial actions [7], the Dynamic Intervention Engine evaluates a composite decision rule I ( s i ) conditioned on abandonment probability threshold τ = 0.65 and minimum engagement depth:
I ( s i ) = Action A : Instant Promotional Coupon ( 5 % – 8 % off ) , if P aband ( s i ) ≥ 0.75 and cart _ freq ≥ 1 , Action B : Zero - Interest Financing / Free Shipping , if 0.65 ≤ P aband ( s i ) < 0.75 and price _ sens > 1.2 , Action C : Tech Spec Comparison Assistant Pop - up , if P aband ( s i ) ≥ 0.65 and spec _ comp ≥ 3 , No Intervention ( Standard Browsing ) , otherwise .

2.6. Cloud SaaS Architecture and Dual Persistence on AWS

In alignment with MLaaS and real-time analytics architectural principles [11,13], the system is deployed as a multi-tenant cloud platform on Amazon Web Services (AWS). Client e-commerce stores connect through a lightweight JavaScript SDK that streams session events to an AWS API Gateway protected by stateless JSON Web Token (JWT) authentication and tenant-isolated access policies.
To satisfy both ultra-low-latency streaming ingestion and transactional business reporting, the architecture implements a dual persistence design:
  • Amazon DynamoDB (Non-Relational Streaming Layer): Active clickstream sequences and sliding session windows are ingested into DynamoDB tables partitioned by tenant_id and sorted by session_id. This serverless key-value store absorbs high-concurrency traffic spikes and delivers sub-50 ms read/write responsiveness ( ≈ 40 ms mean ingestion latency) for real-time tensor assembly.
  • Amazon RDS for PostgreSQL (ACID Relational Layer): Session classification outcomes, top TreeSHAP contributor vectors, triggered intervention logs, commercial alerts, tenant configuration rules, and financial metrics of recovered revenue are persisted in Amazon RDS (PostgreSQL). This guarantees ACID transactional integrity and powers complex analytical queries for the administrative SaaS dashboard.

2.7. Evaluation Metrics and Dual-Front Validation Protocols

Algorithmic discrimination is evaluated on the hold-out test set ( 6,750 sessions) using Accuracy, Precision, Recall, F1-Score, and AUC-ROC:
Precision = T P T P + F P , Recall = T P T P + F N , F 1 - Score = 2 · Precision · Recall Precision + Recall .
Cloud responsiveness is evaluated by measuring end-to-end latency L total = L API + L DynamoDB + L prep + L GRU + XGB + L SHAP against the strict design SLA of < 500 ms. Functional and operational validation in the technological retail sector of Lima, Peru was executed through a structured Dual-Front Expert Validation Protocol using a 5-point Likert scale ( 1.00 = Deficient to 5.00 = Excellent , with an approval threshold of ≥ 4.00 ) across the Technical Validation Front (Machine Learning, Backend, and AWS Cloud specialists) and the Technological Retail Business Validation Front (e-commerce managers and retail commercial specialists).

3. Results

3.1. Predictive Performance and Ablation Study

To empirically verify the contribution of combining sequential behavioral representations with gradient-boosted trees, we conducted an ablation study comparing the proposed Hybrid GRU + XGBoost engine against four baseline architectures on the unseen hold-out test set ( 6,750 technological retail sessions). Table 5 reports the classification performance across all evaluated models.
As evidenced in Table 5, the linear baseline (Logistic Regression) achieves an AUC-ROC of only 0.784 and an F1-Score of 0.721, demonstrating its inability to model non-linear interactions among browsing features. Standalone GRU captures sequential event transitions and achieves a solid Recall of 0.861 ( AUC - ROC = 0.889 , F 1 - Score = 0.854 ), whereas Standalone XGBoost leverages aggregated session attributes to reach an AUC-ROC of 0.912 and an F1-Score of 0.886. However, when the 64-unit GRU temporal embedding h i , T is fused with the structured session attributes x i , tab , the Hybrid GRU + XGBoost engine attains a superior AUC-ROC of 0.937 and an F1-Score of 0.930 (Precision = 0.936, Recall = 0.924, Accuracy = 0.918). This represents an absolute improvement of + 4.4 % in F1-Score and + 2.5 % in AUC-ROC over Standalone XGBoost, and + 7.6 % in F1-Score over Standalone GRU, confirming the synergistic value of sequential-tabular fusion.

3.2. Cloud Ingestion and Real-Time Inference Latency Benchmarks

To ensure that predictive inference and intervention dispatch do not degrade the shopper’s browsing experience, the deployed SaaS system was benchmarked in the AWS cloud environment. Table 6 reports the component-level latency breakdown across the execution pipeline, and Table 7 presents the concurrency stress test results from 50 to 500 simultaneous active sessions.
As shown in Table 6 and Table 7, non-relational event ingestion in Amazon DynamoDB averages 40 ms, effectively preventing I/O bottlenecks during high-frequency clickstream bursts. The complete end-to-end prediction cycle executes in an average of 0.43 s (430 ms) with a 95th percentile of 489 ms at 250 concurrent sessions, strictly fulfilling the < 500 ms real-time design threshold. Meanwhile, relational writes of business KPIs, commercial alerts, and SHAP audit logs into Amazon RDS (PostgreSQL) are handled asynchronously via message queues, preserving full ACID compliance without adding latency to the customer-facing intervention response.

3.3. Model Interpretability via TreeSHAP in Technological Retail

Table 8 reports the global feature importance ranking derived from mean absolute TreeSHAP values Mean | ϕ j | across the test partition, revealing the primary behavioral factors driving conversion or abandonment in technological retail.
The TreeSHAP evaluation confirms that the GRU Sequential Embedding ( h i , T ) is the single most influential predictor ( Mean | ϕ 1 | = 0.284 ), demonstrating that the chronological order of user actions carries decisive predictive power beyond static counts. Furthermore, checkout_dropoff_signal ( 0.218 ), cart_interaction_freq ( 0.185 ), and spec_comparison_count ( 0.114 ) highlight domain-specific behaviors of technological retail shoppers: customers frequently experience “specification comparison paralysis” when evaluating laptops or PC components, or hesitate upon viewing shipping and financing costs at checkout.

3.4. Commercial Impact of Dynamic Interventions by Product Category

To evaluate how real-time predictions translate into commercial recovery across the 78.5% abandonment baseline, Table 9 disaggregates model detection accuracy, primary triggered interventions, and estimated conversion recovery rates across four core technological retail product categories in Lima, Peru.

3.5. Dual-Front Validation Protocol Results in the Technological Retail Sector

To validate the complete Predictive SaaS System from both software/algorithmic engineering and commercial retail management perspectives, structured validation protocols were executed with domain specialists. Table 10 presents the itemized scores obtained across the Technical Validation Front and the Technological Retail Business Validation Front.
As documented in Table 10, the Technical Validation Front achieved an overall mean score of 4.60 / 5.00, with specialists highlighting the architectural separation between high-speed event ingestion in Amazon DynamoDB (40 ms) and ACID transactional storage in Amazon RDS for PostgreSQL (4.65/5.00), as well as the discriminative superiority of the hybrid GRU + XGBoost model (4.60/5.00). Simultaneously, the Technological Retail Business Validation Front achieved an overall mean score of 4.50 / 5.00, with retail specialists emphasizing the high value of TreeSHAP interpretability (4.55/5.00) for understanding why a shopper hesitates and confirming the commercial effectiveness of dynamic pop-ups and financing alerts in mitigating the 78.5% abandonment rate.

4. Discussion

The empirical results obtained in this research demonstrate that combining sequential deep learning (GRU) with gradient-boosted decision trees (XGBoost) inside a cloud-native Predictive SaaS System provides a robust technological solution to shopping cart and session abandonment in technological retail e-commerce. In comparison with previous studies that rely exclusively on static session aggregates—such as Abdullah-All-Tanvir et al. [1] and Lin [9]—our ablation study proves that static tabular models (Standalone XGBoost: AUC - ROC = 0.912 , F 1 - Score = 0.886 ) fail to capture the temporal directionality of user actions. Specifically, two browsing sessions may share identical aggregate counts of viewed products and cart interactions, yet exhibit opposite behavioral trajectories: one user progressing steadily from comparison toward checkout, and another retreating from the shipping cost screen back to catalog browsing. By encoding the chronological sequence of the last T = 25 micro-events through a 64-unit GRU layer, the hybrid engine captures this temporal momentum ( Mean | ϕ GRU | = 0.284 ), elevating the AUC-ROC to 0.937 and the F1-Score to 0.930.
Furthermore, our findings extend the clickstream representation principles of Tokuç and Dag [6] and the sequential modeling frameworks of Guo et al. [2] and Karthik et al. [3] from offline analysis into real-time production execution. Whereas prior sequential recommender systems [4,5,8] focus on ranking catalog items without addressing session exit risk, our platform links sequential-tabular inference directly to a dynamic commercial intervention engine [7]. Crucially, achieving an average end-to-end inference latency of 0.43 s (430 ms) on AWS ensures that personalized coupons, financing calculators, or specification comparison assistants are displayed while the user is still active on the page.
From an architectural perspective, the dual persistence strategy aligns with modern real-time analytics and MLaaS guidelines [11,13]. Offloading high-velocity clickstream writes to Amazon DynamoDB (40 ms latency) prevents relational database locking during peak retail campaigns (such as Cyber Days in Lima, Peru), while persisting consolidated predictions, SHAP attributions, and financial recovery records in Amazon RDS for PostgreSQL guarantees full ACID compliance for managerial auditing. Additionally, integrating TreeSHAP [10,15] directly into the multi-tenant dashboard addresses the explainability barrier in commercial AI adoption, as validated by the 4.50/5.00 rating from technological retail specialists.
Despite these strengths, certain limitations warrant consideration. First, while SMOTE effectively balances the training distribution, shifts in seasonal consumer behavior (e.g., holiday hardware launches) require periodic model retraining to prevent concept drift. Second, the intervention rules currently follow calibrated probability thresholds ( τ = 0.65 ); future iterations could incorporate Contextual Multi-Armed Bandits or Reinforcement Learning to dynamically optimize the exact discount percentage offered to each customer segment so as to maximize net profit margins alongside conversion lift.

5. Conclusions

This article presented the design, mathematical formulation, AWS cloud implementation, and empirical validation of a Predictive SaaS System based on a hybrid GRU and XGBoost engine aimed at increasing user conversion rates in technological retail e-commerce platforms in Lima, Peru. The main conclusions of the study are as follows:
  • By fusing 64-unit GRU temporal embeddings of real-time clickstream sequences with normalized tabular session features and SMOTE training balance, the hybrid engine achieved an AUC-ROC of 0.937, an F1-Score of 0.930, a Precision of 0.936, and a Recall of 0.924, significantly outperforming standalone GRU and standalone XGBoost baselines.
  • The AWS cloud architecture featuring dual storage in Amazon DynamoDB (40 ms streaming ingestion) and Amazon RDS for PostgreSQL (ACID relational persistence) achieved an average end-to-end inference latency of 0.43 s (430 ms) across concurrent load tests, strictly satisfying the < 500 ms real-time operational threshold.
  • TreeSHAP interpretability confirmed that sequential behavioral dynamics ( | ϕ | = 0.284 ), checkout funnel drop-off signals ( | ϕ | = 0.218 ), cart interaction frequency ( | ϕ | = 0.185 ), and technical specification comparisons ( | ϕ | = 0.114 ) are the primary drivers of conversion and abandonment in technological retail.
  • The Dual-Front Expert Validation Protocol yielded approval scores of 4.60 / 5.00 in the Technical Front and 4.50 / 5.00 in the Technological Retail Business Front, confirming the technical scalability, interpretability, and commercial effectiveness of the SaaS platform for mitigating the 78.5% abandonment rate in the technological retail sector.

Author Contributions

Conceptualization, G.E.T.A. and R.A.S.A.; methodology, G.E.T.A., R.A.S.A. and C.A.A.Q.; software, G.E.T.A. and R.A.S.A.; validation, G.E.T.A., R.A.S.A. and C.A.A.Q.; formal analysis, G.E.T.A. and R.A.S.A.; investigation, G.E.T.A. and R.A.S.A.; resources, G.E.T.A. and R.A.S.A.; data curation, G.E.T.A. and R.A.S.A.; writing—original draft preparation, G.E.T.A. and R.A.S.A.; writing—review and editing, C.A.A.Q.; visualization, G.E.T.A. and R.A.S.A.; supervision, C.A.A.Q.; project administration, G.E.T.A. and R.A.S.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The anonymized clickstream session dataset, feature engineering pipelines, and validation protocol instruments supporting the reported results are available from the corresponding author upon reasonable request.

Acknowledgments

The authors thank the Carrera de Ingeniería de Sistemas de Información at the Universidad Peruana de Ciencias Aplicadas (UPC) and the domain specialists in machine learning, cloud architecture, and technological retail e-commerce in Lima, Peru who participated in the validation protocols.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SaaS Software as a Service
GRU Gated Recurrent Unit
XGBoost Extreme Gradient Boosting
SHAP SHapley Additive exPlanations
SMOTE Synthetic Minority Over-sampling Technique
AUC-ROC Area Under the Receiver Operating Characteristic Curve
MLaaS Machine Learning as a Service
AWS Amazon Web Services
RDS Relational Database Service
JWT JSON Web Token
SKU Stock-Keeping Unit
SLA Service Level Agreement

References

  1. Abdullah-All-Tanvir, A.; Khandokar, I.A.; Islam, A.K.M.M.; Islam, S.; Shatabda, S. A gradient boosting classifier for purchase intention prediction of online shoppers. Heliyon 2023, 9, e15163. [Google Scholar] [CrossRef] [PubMed]
  2. Guo, H.; Guo, Z.; Liu, Z. Personalized recommendation model based on improved GRU network in big data environment. Comput. Intell. Neurosci. 2023, 2023, 3162220. [Google Scholar] [CrossRef]
  3. Karthik, R.V.; Pandiyaraju, V.; Ganapathy, S. A context and sequence-based recommendation framework using GRU networks. Artif. Intell. Rev. 2025, 58, 1–32. [Google Scholar] [CrossRef]
  4. Wu, H.; Geng, C.; Fang, H. Session-based recommendation by exploiting substitutable and complementary relationships from multi-behavior data. arXiv 2024, arXiv:2312.14957. Available online: https://arxiv.org/abs/2312.14957.
  5. Betello, F.; Trappolini, G.; Purificato, A.; Bacciu, A.; Silvestri, F.; Siciliano, F.; Tonellotto, N. A reproducible analysis of sequential recommender systems. arXiv 2024, arXiv:2408.03873. [Google Scholar] [CrossRef]
  6. Tokuç, A.A.; Dag, T. Predicting user purchases from clickstream data: A comparative analysis of clickstream data representations and machine learning models. IEEE Access 2025, 13, 43796–43816. [Google Scholar] [CrossRef]
  7. Seo, D.; Yoo, Y. Improving shopping mall revenue by real-time customized digital coupon issuance. IEEE Access 2023, 11, 7924–7931. [Google Scholar] [CrossRef]
  8. Zhou, S.; Hudin, N.S. Advancing e-commerce user purchase prediction: Integration of time-series attention with event-based timestamp encoding and Graph Neural Network-enhanced user profiling. PLoS ONE 2024, 19, e0299087. [Google Scholar] [CrossRef] [PubMed]
  9. Lin, J. Application of machine learning in predicting consumer behavior and precision marketing. PLoS ONE 2025, 20, e0321854. [Google Scholar] [CrossRef] [PubMed]
  10. Peng, K.; Peng, Y.; Li, W. Research on customer churn prediction and model interpretability analysis. PLoS ONE 2023, 18, e0289724. [Google Scholar] [CrossRef] [PubMed]
  11. Chen, W.; Milosevic, Z.; Rabhi, F.A.; Berry, A. Real-time analytics: Concepts, architectures, and ML/AI considerations. IEEE Access 2023, 11, 71634–71657. [Google Scholar] [CrossRef]
  12. Dritsas, E.; Trigka, M. Machine learning in e-commerce: Trends, applications, and future challenges. IEEE Access 2025, 13, 99048–99067. [Google Scholar] [CrossRef]
  13. Pereira, I.; Madureira, A.; Bettencourt, N.; Coelho, D.; Rebelo, M.Â.; Araújo, C.; de Oliveira, D.A. A machine learning as a service (MLaaS) approach to improve marketing success. Informatics 2024, 11, 19. [Google Scholar] [CrossRef]
  14. Hidasi, B.; Karatzoglou, A. Recurrent neural networks with top-k gains for session-based recommendations. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management (CIKM), Torino, Italy, 22–26 October 2018; pp. 843–852. [Google Scholar] [CrossRef]
  15. Lundberg, S.M.; Erion, G.; Chen, H.; DeGrave, A.; Prutkin, J.M.; Nair, B.; Katz, R.; Himmelfarb, J.; Bansal, N.; Lee, S.I. From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell. 2020, 2, 56–67. [Google Scholar] [CrossRef] [PubMed]
  16. Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic minority over-sampling technique. J. Artif. Intell. Res. 2002, 16, 321–357. [Google Scholar] [CrossRef]
  17. Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar] [CrossRef]
  18. Requena, B.; Cassani, G.; Tagliabue, J.; Greco, C.; Lacasa, L. Shopper intent prediction from clickstream e-commerce data with minimal browsing information. Sci. Rep. 2020, 10, 16983. [Google Scholar] [CrossRef] [PubMed]
  19. Cirqueira, D.; Hofer, M.; Nedbal, D.; Helfert, M.; Bezbradica, M. Customer purchase behavior prediction in e-commerce: A conceptual framework and research agenda. In New Trends in Intelligent Software Methodologies, Tools and Techniques; IOS Press: Amsterdam, The Netherlands, 2019; pp. 119–136. [Google Scholar] [CrossRef]
  20. Alves Gomes, M.; Meisen, T. A review on customer segmentation methods for personalized customer targeting in e-commerce use cases. Inf. Syst. E-Bus. Manag. 2023, 21, 527–570. [Google Scholar] [CrossRef]
Figure 1. Methodological and cloud execution workflow of the proposed GRU + XGBoost Predictive SaaS System for real-time conversion prediction and dynamic intervention.
Figure 1. Methodological and cloud execution workflow of the proposed GRU + XGBoost Predictive SaaS System for real-time conversion prediction and dynamic intervention.
Preprints 245616 g001
Table 1. Comparative analysis of related clickstream and e-commerce prediction studies versus the proposed Predictive SaaS System.
Table 1. Comparative analysis of related clickstream and e-commerce prediction studies versus the proposed Predictive SaaS System.
Study / Reference Sequential Tabular Real-Time SHAP Cloud SaaS Primary Scope
Abdullah-All-Tanvir et al. [1] No Yes (XGB) No No No Offline purchase classification
Guo et al. [2] Yes (GRU) No No No No Personalized recommendation
Karthik et al. [3] Yes (GRU) Context No No No Sequence recommendation
Tokuç and Dag [6] Hybrid Yes No No No Clickstream representation
Seo and Yoo [7] No Rules/ML Yes No No Digital coupon issuance
Peng et al. [10] No Ensemble No Yes No Churn interpretability
Pereira et al. [13] No AutoML API Partial MLaaS Marketing campaign MLaaS
Proposed System Yes (GRU) Yes (XGB) Yes ( < 0.5 s) Yes Yes (AWS) Real-time conversion & intervention in tech retail
Table 2. Methodological phases of the proposed Predictive SaaS System.
Table 2. Methodological phases of the proposed Predictive SaaS System.
Phase Methodological Description Operational Deliverable
1. Clickstream capture Real-time collection of navigation events: clicks, viewed technological SKUs, specification checks, dwell time, cart actions, and promotional interactions. Raw session clickstream dataset ingested into Amazon DynamoDB.
2. Data preprocessing Cleaning of malformed/bot sessions, One-Hot encoding of categorical variables, Min-Max normalization of numerical attributes, and missing value imputation. Standardized and encoded session records ready for modeling.
3. Session representation Grouping of events by session ID preserving chronological order ( T = 25 ) alongside aggregated session-level metrics. Hybrid sequential tensors ( E i ) and tabular feature vectors ( x i , tab ).
4. Class balancing Application of SMOTE exclusively on the training partition to address the 78.5% non-purchase imbalance without test leakage. Balanced training partition; unaltered validation and test sets.
5. Hybrid training Sequential feature extraction via a 64-unit GRU network followed by concatenated classification using regularized XGBoost. Trained and serialized hybrid GRU + XGBoost predictive engine.
6. Dynamic intervention Automated triggering of personalized offers, pop-ups, or financing alerts when abandonment probability exceeds threshold τ . Real-time commercial action delivered in < 500 ms (mean 430 ms).
7. Evaluation & validation Benchmarking via classification metrics, AWS latency stress tests, TreeSHAP interpretability, and dual-front expert validation protocols. Validated multi-tenant Predictive SaaS System and dashboard.
Table 3. Feature engineering schema for the hybrid session representation in technological retail e-commerce.
Table 3. Feature engineering schema for the hybrid session representation in technological retail e-commerce.
Variable Identifier Representation Domain Operational Definition in Technological Retail
session_duration_sec Tabular Aggregated R + Total active elapsed duration (s) of the current browsing session.
viewed_tech_products Tabular Aggregated Z + Count of unique technological SKUs inspected by the user.
spec_comparison_count Tabular Aggregated Z + Number of technical specification table expansions or side-by-side SKU comparisons.
product_dwell_time_avg Tabular Aggregated R + Mean time (s) spent reading high-ticket product detail pages.
cart_interaction_freq Tabular Aggregated Z + Total cart additions, quantity modifications, and item removals.
offer_interaction_flag Tabular Aggregated { 0 , 1 } Binary indicator of clicks on promotional coupons or installment calculators.
checkout_dropoff_signal Tabular Aggregated { 0 , 1 , 2 , 3 } Funnel progression index measuring backward navigation from shipping/payment steps.
price_tier_sensitivity Tabular Aggregated R + Ratio of viewed product price to the mean category price in the store catalog.
visitor_type Contextual Categorical Customer status: returning buyer, registered user, or anonymous guest.
traffic_source Contextual Categorical Acquisition channel: direct traffic, organic search, paid ads, or social media referral.
device_platform Contextual Categorical Client environment: desktop web, mobile iOS, or mobile Android.
event_sequence_tensor Sequential (GRU) R 25 × d e Chronological sequence of the last T = 25 micro-events and inter-event time deltas Δ t .
Table 4. Hyperparameter search spaces and optimal configurations for the Hybrid GRU + XGBoost engine.
Table 4. Hyperparameter search spaces and optimal configurations for the Hybrid GRU + XGBoost engine.
Module Hyperparameter Search Space Explored Optimal Value
GRU Encoder Recurrent hidden units ( d h ) { 32 , 64 , 128 } 64
GRU Encoder Sequence window length (T) { 15 , 25 , 40 } 25
GRU Encoder Dropout rate { 0.1 , 0.2 , 0.3 } 0.2
GRU Encoder Optimizer & learning rate Adam { 10 − 4 , 5 × 10 − 4 , 10 − 3 } Adam ( 10 − 3 )
XGBoost Classifier Number of boosting trees (K) { 100 , 200 , 300 , 500 } 250
XGBoost Classifier Maximum tree depth ( D max ) { 4 , 6 , 8 , 10 } 6
XGBoost Classifier Learning rate ( η ) { 0.01 , 0.05 , 0.10 , 0.20 } 0.05
XGBoost Classifier Subsample & col. sample { 0.7 , 0.8 , 0.9 , 1.0 } 0.85 / 0.80
XGBoost Classifier Regularization ( γ , λ ) γ ∈ { 0 , 0.1 , 0.5 } ; λ ∈ { 1 , 2 , 5 } γ = 0.1 , λ = 2.0
Table 5. Ablation study and classification metrics on the hold-out technological retail test partition ( N test = 6,750 sessions).
Table 5. Ablation study and classification metrics on the hold-out technological retail test partition ( N test = 6,750 sessions).
Model Architecture Accuracy Precision Recall F1-Score AUC-ROC
Logistic Regression (Linear Baseline) 0.768 0.738 0.705 0.721 0.784
Random Forest (100 CART Trees) 0.834 0.833 0.798 0.815 0.862
Standalone GRU (Sequential Tensor Only) 0.869 0.847 0.861 0.854 0.889
Standalone XGBoost (Tabular Features Only) 0.894 0.898 0.874 0.886 0.912
Hybrid GRU + XGBoost (Proposed SaaS Engine) 0.918 0.936 0.924 0.930 0.937
Table 6. End-to-end latency breakdown across the AWS SaaS microservices pipeline.
Table 6. End-to-end latency breakdown across the AWS SaaS microservices pipeline.
Pipeline Stage / AWS Service Component Mean Latency (ms) 95th Percentile (ms) Design SLA Target
1. AWS API Gateway Routing & JWT Verification 28 ms 39 ms < 50 ms
2. Amazon DynamoDB Clickstream Event Ingestion 40 ms 54 ms < 60 ms
3. Real-Time Feature Normalization & Tensor Prep 62 ms 78 ms < 100 ms
4. Hybrid GRU Encoding + XGBoost Classification 245 ms 282 ms < 300 ms
5. TreeSHAP Attribution & Intervention Dispatch 55 ms 68 ms < 80 ms
Total End-to-End Inference Latency ( L total ) 430 ms (0.43 s) 489 ms (0.49 s) < 500 ms (0.50 s)
Table 7. Cloud concurrency stress testing of the Predictive SaaS System on AWS.
Table 7. Cloud concurrency stress testing of the Predictive SaaS System on AWS.
Concurrent Active Sessions DynamoDB Ingestion (ms) Mean Inference Latency (s) p95 Inference Latency (s) SLA Compliance ( < 0.50 s)
50 sessions 34 ms 0.38 s (380 ms) 0.42 s (420 ms) 100.0%
100 sessions 37 ms 0.40 s (400 ms) 0.45 s (450 ms) 99.8%
250 sessions 40 ms 0.43 s (430 ms) 0.48 s (480 ms) 99.4%
500 sessions 46 ms 0.46 s (460 ms) 0.49 s (490 ms) 98.7%
Table 8. Global feature importance ranking based on mean absolute TreeSHAP values ( | ϕ j | ).
Table 8. Global feature importance ranking based on mean absolute TreeSHAP values ( | ϕ j | ).
Rank Feature / Model Component Mean | ϕ j | Behavioral Interpretation in Technological Retail
1 GRU Sequential Embedding ( h i , T ) 0.284 Captures sequential transition velocity from product inspection to checkout.
2 checkout_dropoff_signal 0.218 Backward navigation from shipping/payment screens strongly indicates imminent exit.
3 cart_interaction_freq 0.185 Repeated cart additions/removals reflect price hesitation on high-ticket hardware.
4 product_dwell_time_avg 0.142 Sustained dwell time ( > 90 s) on technical product pages increases conversion odds.
5 spec_comparison_count 0.114 Comparing ≥ 3 similar SKUs indicates high purchase intent but choice overload risk.
6 offer_interaction_flag 0.089 Active inspection of financing/coupon tabs signals price-sensitive purchase readiness.
7 traffic_source (Direct/Organic) 0.078 Direct and organic search visitors exhibit higher baseline conversion than social ads.
8 visitor_type (Returning) 0.062 Returning authenticated customers display lower abandonment rates than guest users.
Table 9. Performance and intervention analysis across technological retail product categories.
Table 9. Performance and intervention analysis across technological retail product categories.
Technological Retail Category Baseline Abandonment Sub-sample AUC-ROC Primary Triggered Action Conversion Recovery Lift
Laptops & Gaming Computers 82.4% 0.944 Zero-Interest Financing Alert + 18.6 % relative lift
Smartphones & Tablets 76.8% 0.935 Instant Promotional Coupon (5%) + 21.2 % relative lift
PC Hardware & Components 79.1% 0.939 Tech Spec Comparison Assistant + 16.8 % relative lift
Peripherals & Audio Accessories 74.2% 0.928 Free Express Shipping Pop-up + 23.4 % relative lift
Global Storefront Average 78.5% 0.937 Dynamic Multi-Action Engine + 19.8 % relative lift
Table 10. Results of the Dual-Front Expert Validation Protocol (5-point Likert scale: 1.00–5.00).
Table 10. Results of the Dual-Front Expert Validation Protocol (5-point Likert scale: 1.00–5.00).
Validation Front Evaluated Criterion / Protocol Indicator Mean Score Target Status
1. Technical Front 1.1. AWS Cloud Architecture Scalability & Microservices Design 4.65 / 5.00 ≥ 4.00 Validated
(ML, Backend & 1.2. Dual Persistence Coherence (DynamoDB 40 ms + PostgreSQL RDS) 4.65 / 5.00 ≥ 4.00 Validated
AWS Cloud 1.3. Hybrid GRU + XGBoost Predictive Performance (AUC 0.937, F1 0.930) 4.60 / 5.00 ≥ 4.00 Validated
Specialists) 1.4. End-to-End Real-Time Inference Latency Compliance ( 0.43 s < 0.50 s ) 4.55 / 5.00 ≥ 4.00 Validated
1.5. API Security (JWT Authentication) & Multi-Tenant Isolation 4.55 / 5.00 ≥ 4.00 Validated
Technical Validation Front Overall Mean 4.60 / 5.00 ≥ 4.00 Approved
2. Business Front 2.1. Administrative SaaS Dashboard Usability & KPI Clarity 4.50 / 5.00 ≥ 4.00 Validated
(Technological 2.2. Practicality of TreeSHAP Explanations for Commercial Analysts 4.55 / 5.00 ≥ 4.00 Validated
Retail Sector 2.3. Timeliness & Relevance of Real-Time Abandonment Alerts 4.50 / 5.00 ≥ 4.00 Validated
Specialists) 2.4. Alignment of Dynamic Interventions with Tech Retail Buyer Journey 4.50 / 5.00 ≥ 4.00 Validated
2.5. Perceived Impact on Reducing Cart Abandonment & Recovering Revenue 4.45 / 5.00 ≥ 4.00 Validated
Technological Retail Business Front Overall Mean 4.50 / 5.00 ≥ 4.00 Approved
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.