## 6 Discussion  
This analysis does not imply that practitioners should only use these ML models. Rather, this study is the first to investigate web analytics and COSMIC, and we believe that these results demonstrate both the feasibility of applying functional size for web analytics and its usefulness in predicting web analytics project efforts.  
Based on the empirical results, we offer the following practical contributions for web analytics practitioners.  
1. Feasibility of applying COSMIC to web analytics: COSMIC functional size measurement is feasible and effective for web analytics. Practitioners who use Google Tag Manager in web analytics implementations can use COSMIC across diverse web analytics projects to measure their software functional size and plan projects accordingly.
2. Effort prediction using functional size measurements: The results illustrate that the effort of web analytics implementation can be predicted using the COSMIC-based functional size. This supports practitioners with data-driven decisions rather than ad hoc decisions.
3. Benchmarking and comparison between projects: The COSMIC functional size measurement allows practitioners to compare web analytics projects based on their functional sizes. This supports informed decisions by identifying which projects require more effort and justifies budget and staffing decisions. Stakeholders can understand the reasons for allocating more time and budget to certain projects.
4. Guidance on model selection for effort estimation: Using COSMIC as inputs, the evaluation of the machine learning models provides insights into the most suitable model for predicting web analytics implementation efforts: * Practitioners interested in stable and interpretable models can use Linear Regression, as the empirical results show that it has the lowest error rate and highest Standard Accuracy (SA = 0.86).
* Practitioners interested in high accuracy can use Extra Trees and the Voting Regressors because the empirical results show 98% accuracy, offering strong predictive performance on unseen data.  
This study also offers theoretical contributions, as follows:  
5. Extends the application of COSMIC to emerging domains: This study contributes to the software engineering body of knowledge by demonstrating a feasible adoption of COSMIC in web analytics, an unaddressed domain in COSMIC literature. While COSMIC has been widely applied in software projects, its application in tag-based, configurable systems, such as Google Tag Manager (GTM), has not been previously explored.
6. Offers conceptual mapping between COSMIC and GTM concepts: This study provides a clear mapping between GTM concepts (tags, triggers, variables, and dataLayer) and COSMIC concepts (functional processes, Entry, Exit, Write and Read). This offers a novel theoretical mapping, not addressed previously in the literature, that models web analytics setups as measurable software components.
7. Offers interdisciplinary research that integrates software engineering, software measurement theories, and web analytics.
8. Offers a COSMIC-based framework for measurement and effort estimation in web analytics. This can serve as a reference and reusable framework for other analytics systems (e.g., Adobe Analytics).