Full text
Enhanced Web Analytics for Health Insurance Piero Maggi Internship Report presented as the partial requirement fo r obtaining a Master's degree in Data Science and Advance d Analytics
ii NOVAInformationManagementSchool InstitutoSuperiordeEstatísticaeGestãodeInformação UniversidadeNovadeLisboa Enhanced Web Analytics for Health Insurance PieroMaggi Internship Report presented as the partial requirement for obtaining a Master's degree in Data Science and Advanced Analytics Advisor: Leonardo Vanneschi External Advisors: Paula Santos, Jéssica Raquel Zaqueu February 2020
iii DEDICATION To my family which made all of this possible.
iv ACKNOWLEDGEMENTS To Andrè Rufino and Paula Santos, thank you for giving me the opportunity to work with you and for making sure that this internship was fulfilled with precious learning experiences. I also want to thank the whole host company and my team for the help and support provided along these nine months. To Jéssica Zaqueu, what a ride this has been. Thank you for the support you always gave me, as a colleague but most importantly as a friend. Through the many challenges that together we have been facing you taught me how to stop, zoom out and see the problems from a different perspective. To Leonardo Vanneschi, thank you for giving me the opportunity to join this Master and for being my supervisor. To my mates Andreas and Dalì, with whom I shared this experience with.
v ABSTRACT Nowadays companies need invest and improve on data solution implementation within most of the business workflows and processes, in order to differentiate the offer and stay ahead of their competitors. It’s becoming more and more important to take data driven decisions to boost profitability and improve the overall customer experience. In this way, strategies are defined not anymore on common beliefs and assumptions, but on contextualized and trustful insights. This reports describes the work that has been made during a 9-month internship, in order to provide the business with a new and improved solution for enhancing the web analytics tasks and supporting the improve of the online user digital experience. User-level data related to the website activity has been extracted at the highest granularity level. Afterwards, raw data have been cleaned and stored in an Analytical Base Table with which an initial data exploration has been made. After giving initial insights to the digital team, a predictive model has been developed in order to predict the probability of the users to buy the insurance product online. Finally, based on the initial data exploration and the model’s results, a set of recommendations has been built and provided to the digital department for their implementation in order to make the website more engaging and dynamic. KEYWORDS Web Analytics, Google Analytics, Supervised Learning, Decision Tree, Logistic regression, Random Forest, User Behavior,
vi TABLE OF CONTENTS 1. INTRODUCTION ..................................................................................................................................... 1 1.2 PROBLEM STATEMENT AND PROCESS DESCRIPTION .................................................................................................. 2 1.2 MOTIVATION .................................................................................................................................................... 3 2. LITERATURE REVIEW ............................................................................................................................. 5 2.1 MACHINE LEARNING .......................................................................................................................................... 5 2.2 SUPERVISED LEARNING ....................................................................................................................................... 6 2.3 CLASSIFICATION ALGORITHMS .............................................................................................................................. 6 2.3.1 Logistic Regression ............................................................................................................................... 6 2.3.2 Decision Tree ........................................................................................................................................ 7 2.3.3 Random Forest ..................................................................................................................................... 8 2.4 IMBALANCED DATASET ....................................................................................................................................... 9 2.5 METRICS ....................................................................................................................................................... 10 2.6 WEB ANALYTICS .............................................................................................................................................. 11 2.6.1 Technical Terminology ........................................................................................................................ 11 3. METHODOLOGY .................................................................................................................................. 14 3.1 PROJECT DESCRIPTION ..................................................................................................................................... 14 3.2 BUSINESS UNDERSTANDING AND SCOPE DEFINITIONS ............................................................................................. 16 3.2 DATA EXTRACTION .......................................................................................................................................... 18 3.4 DATA WRANGLING AND CLEANING ..................................................................................................................... 20 3.5 DATA EXPLORATION ......................................................................................................................................... 21 3.6 DATA PREPARATION ........................................................................................................................................ 24 3.7 MODELLING ................................................................................................................................................... 25 3.8 RESULTS INTERPRETATION ................................................................................................................................. 26 4. SET OF RECOMMENDATIONS .............................................................................................................. 29 5. IMPLEMENTATION OF THE SOLUTION ................................................................................................. 31 6. CONCLUSIONS AND FUTURE WORKS ................................................................................................... 32 7. BIBLIOGRAPHY .................................................................................................................................... 34
vii LIST OF FIGURES Figure 1. Example of a decision tree ......................................................................................... 8 Figure 2. Confusion matrix ...................................................................................................... 10 Figure 3. Crisp-DM framework ................................................................................................ 14 Figure 4. Scitylana Raw Table .................................................................................................. 19 Figure 5. Macro features description ...................................................................................... 20 Figure 6. Users description per language ................................................................................ 22 Figure 7. Difference between groups by continent ................................................................ 22 Figure 8. Difference between group by country ..................................................................... 23 Figure 9. Difference between group by device ....................................................................... 23 Figure 10. Average conversions per weekday ......................................................................... 24 Figure 11. Average conversion rate per weekday ................................................................... 24 Figure 12. Metrics per algorithm implemented ...................................................................... 26 Figure 13. Average errors per conversion probability ............................................................ 27 Figure 14. Channel grouping distribution per conversion probability .................................... 27 Figure 15. Percentage of users per conversion probability level per page visited ................. 28 LIST OF TABLES Table 1. Metrics used for model assessment .......................................................................... 10 Table 2. Technical terms web analytics .................................................................................. 13 Table 3. Project phases, planned vs actual duration .............................................................. 15
viii LIST OF ABBREVIATIONS SEM Search Engine Marketing SEO Search Engine Optimization ABT Analytical Base Table TP True Positive TN True Negative FP False Positive FN False Negative GATC Google Analytics Tracking Code CRISP-DM Cross-industry standard process for data mining ELT Extract, load and transform VPN Virtual Private Network CRM Customer Relationship Management
1 1. INTRODUCTION This project has been developed for a health insurance company that has been operating in Portugal for more than twenty years. With its wide range of products and services offer, the business can be considered one of the top players in the Portuguese market. Main stakeholders for this project were the Analytics Department, designed as the project owner, and the Digital department as the one that benefits the most by the project outcomes. The Analytics department has as a mission pursuing excellence in the Analytics areas, with the research and implementation of new algorithms and sophisticated machine learning techniques. It acts as an enabler for the other business units by delivering data driven insights to better guide the planning of their strategic decisions. The Analytics team is composed by three different profiles: - Solution Architects, who designs the solutions integrated with the stakeholders’ requirements and supervises its implementation; - Data Engineers, who builds the data architectures in order to support the work of the other areas; - Data Scientists, who extracts patterns from data by using complex algorithms, predictive models, clustering within the most advanced machine learning techniques. The Digital Department is the business owner of the website and it is responsible for the following tasks: - Designing and implementing the structure of the website within its content, online marketing campaigns, Search Engine Optimization (SEO) and Search Engine Marketing (SEM) techniques; - Monitoring the activity of the users on the website in order to better define the previous ones; - Designing and constantly adapting the website user’s experience in order to boost its engagement and increase profitability through online sale of the insurance policy. The topic area of development for this project was the web analytics, seen as an ensemble of technologies and methodologies used to collect and analyze data of a website activity. This report is structured in two main parts: within the first part, a technical overview will be given to the reader about machine learning and web analytics concepts in order to ease the comprehension of the second part. The second part is then focused on the development of the project, with deep focus on the objective and achievements of each phase.
8 Figure 1. Example of a decision tree Best practices for this algorithm include the definition of a halting or pruning criterion, with the main objective to control the maximum depth. Increasing the depth of a tree, indeed, does not affect directly the performance of the model; instead, when the decision tree is excessively grown and therefore designed to perfectly fit the all the samples in the training set, there could be a situation of overfitting. 2.3.3 Random Forest Random forest is a supervised learning method which consist of an ensemble of many decision trees. All the decision trees give as an output a class prediction and the most recurrent one becomes the model’s prediction. Each tree of the random forest is grown as follows: • At first, N cases are sampled based on the number of cases in the training set. This is done by replacement of the original data. The obtained set of N instances will be the training set for the tree; • Considering M as the input variables, a subset m<<M is identified such that at each node, m variables are randomly selected and used for splitting. The value of m remains constant during the whole forest growth. • The prediction of each tree is averaged in order to obtain the final prediction of the model
9 By using a traditional bagging with decision-trees, the resulting trees might be very correlated because the same features will tend to be used multiple times to split the samples. The restriction of the features number during the splitting, allows to decrease the correlation between the decision trees in the ensemble; not only, having smaller sets of features at the split of each node the tree can be learnt much faster and then learn more trees in the same amount of given time. 2.4 IMBALANCED DATASET In a classification problem scenario, the dataset is considered imbalanced when it contains many more instances of certain classes than other. In this case, the classification rules that predict small classes tend to be rare, ignored or undiscovered: for this reason, the samples of the test set which belong to the small classed are more likely to be misclassified rather than the ones who belong to the most prevalent classes. The imbalance of the dataset in classification problems causes struggles for the classification algorithms as their accuracy is highly impacted by the inequal distribution in the dependent variable. The performance of the existing classifier get biased towards the majority class: since the algorithms are accuracy driven, their main objective is to minimize the overall error and the contribution of the minority class in this is very small. Also, machine learning algorithms assume that the datasets have balanced class distribution and that the errors obtained from the different classes have the same cost. There are four main methods to solve the imbalance problem in datasets for classification problems: 1. Undersampling: this method reduce the number of instances from the majority class in order to balance the dataset. Usually is the best practice when the dataset is big enough and reducing the number of the training samples has a contained information loss and good impact on latency and storage issues; 2. Oversampling: in this case, the instances of the minority class are replicated in order to increase the frequency of the minority class in the dataset. The biggest advantage of this approach is that there is no information loss; 3. Synthetic oversampling: it is itself an oversampling technique with the main difference that instead of replicating instances of the minority class, it generates artificial data; 4. Cost Sensitive Learning: this technique is not aimed at balancing the dataset itself, but it rather evaluates and highlight the cost of the misclassification of the observations. For this project, considering the dimensions of the dataset, it is been chosen to apply oversampling for the minority class in order to fix the imbalance. The ROSE package in R has many function which help performing these tasks and in particular the ovun.sample one has been used.
10 2.5 METRICS The task of choosing performance metrics to evaluate the implemented algorithms could be critical when working with imbalanced datasets. The greatest part of the classification algorithms calculate the accuracy based on the proportion of instances correctly classified. As the minority class has a relative impact on the overall accuracy, in the case of imbalance data the results could be high deceiving. In order to overcome the above stated issue, the following metrics have been used to assess the performance of the predictive models and choose the winning one: Figure 2. Confusion matrix A true positive is an outcome where the model correctly predicts the positive class. Similarly, a true negative is an outcome where the model correctly predicts the negative class. A false positive is an outcome where the model incorrectly predicts the positive class. And a false negative is an outcome where the model incorrectly predicts the negative class. Metric Formula Accuracy (HF)+)HI)/)(HF)+)HI)+)?F)+)?I) Precision HF)/)(HF)+)?F) Recall HF/)(HF)+)?I) Kappa J)=))((K0−K%))/((1−K%)) F1 score ?1)=)K&%!('("#∗&%!*.. K&%!('("#+&%!*.. Balanced accuracy LMNN)=)(HF/F)+)HI/I)/2 Table 1. Metrics used for model assessment
11 2.6 WEB ANALYTICS This section is aimed to giving the reader a general context regarding the concepts strictly related to web analytics and its glossary of terms that are usually mentioned when referring to web analytics techniques and concepts. Web analytics is widely referred as an ensemble of technologies and methodologies that allows us to collect, measure, analyze and provide reports about websites and web applications usage data (Burby & Brown, 2007). The factors that contributed to the development of this practice within companies of all sizes and across all the sectors are the possibility of measuring most of the actions performed by the website users, the increasing contribution of online activities in companies’ profits and the increasing availability of web analytics tool and options (Arson, 2012). Web analytics can be also seen as an important component of Web Marketing, considering its crucial contribution in calculating the return on investment (ROI) of all the web marketing actions that a business puts in place in order to determine its digital competition in the market. Its role of analysis quantitative and qualitative data of website usage is really crucial when it comes to improving the digital user experience on the website. (Chardonneau, 2011). Within all the tools available on the market for website activity tracking, Google Analytics is the most used with an estimated market share of 85,4%. The tool developed by Google allows to track different statistics such as the duration of the session, the source of the traffic, the number of pages visited, the pages that are visited the most, the geographical localization and many others. This tool was the one that was implemented in the business where this project was developed: in the next chapter a focus will be put on some more technical terms which will be often mentioned through the document when going through the details of process. 2.6.1 Technical Terminology As previously mentioned, Google Analytics is an online tracking tool which is implemented alongside with the website by adding a “page tag”. It is a tracking code of Google (GATC, Google Analytics Tracking Code) which is a block of JavaScript code that the user who wants to track its website activity, implements in all the pages of its web domain. This code interacts directly with the Google server, allowing to collect the browsing data of the users which after are elaborated, developed and shown within the platform. The GACT, other than transferring the data to Google’s server, it sets the first party cookie in every visitor’s computer in order to memorize anonymous information such as the type of visitor (if it’s new or returning), the duration of the visit and the type of the source. In this way, the tool can collect information regarding the user behavior on the website in order to provide the owner of the website with some insights regarding its performance.
12 Keeping this in mind, Google Analytics uses sampling and aggregating data techniques in order to make reports faster and efficient for the final user, sometimes by compromising the integrity of the information. The result of this approach is that Google Analytics allows the exportation of data from the user interface with the lowest granularity level of information: data can be extracted per group of users based on age, geographical information, source of the user visits between other dimensions. Although this type of information could be very useful while looking at the big picture of what’s going on between the users and the website, if some more deep techniques need to be applied to better understand the users and their preferences while browsing, this type of data could lead to drawing inaccurate conclusions. For the scope of this project, for machine learning techniques to be applied, a higher level of granularity was needed as the focus needed to be put on the individual user rather than its belonging group: techniques used to reach such results will be better illustrated in the upcoming chapters. Moving to a more practical definition of the terms related to web analytics, the table below summarizes the main terms web analytics related that will be recurrently used throughout this report. Bounce Rate Rate of visitors that leave the website after having viewed only one page Paid Search Users that landed on the website by clicking on an ad Conversion The point at which an activity or response to a call to action fulfills the desired outcome Returning Visitor a visitor who can be identified with multiple visits, through cookies or authentication Hit Also called a page hit, the retrieval of any item (image, page) from a web server Session A record of a single visitor browsing a website during a given time period. This can include multiple screen or pageviews, events, or ecommerce transactions. Sessions end at midnight on the day a session was initiated or after 30 minutes of inactivity New visitor Visitors who have reached a site for the first time. This is important in comparison with return visitors as an indication of loyalty and site value Cookie A text file placed on a visitor’s computer while browsing a website. Cookies are used to track returning visitors.
13 Organic Search Describes search that generates results that are not paid advertisements Landing Page The page intended to identify the beginning of the user experience resulting from a defined marketing effort. In other words, a landing page is a standalone web page that has been designed for a single objective Channel Grouping Rule based grouping of the website traffic source Goal Activity completed by the user which bring value to its online visit Table 2. Technical terms web analytics
14 3. METHODOLOGY 3.1 PROJECT DESCRIPTION As has been previously highlighted, the project was developed for the Analytics department, in collaboration with the Digital Department. The phases and the tasks below listed have been planned accordingly with both departments and regular follow up meetings were held in order to sync between the activities of the two departments and avoid overlapping of activities. The project was planned to be developed in five main phases on a time frame of nine months. The structure of the project has been designed by following the guidelines of the framework CRISP-DM (Cross-industry standard process for data mining), with the addition of the data extraction phase which was not included. Below a brief overview of the phases and the tasks performed in each one of them will be given: all of the phases will be then further developed within the next chapters. Figure 3. Crisp-DM framework Business Understanding: - Overview of the business and its organizational structure; - Understanding of insurance and web analytics related concepts; - Project contextualization; - Definition of the project objectives and scopes; - Definition of departments highly impacted by the project’s outcome; - Literature review.
15 Data Extraction and Cleaning: - Data source identification; - Testing of different APIs for data extraction; - Research for data extraction tool; - Data extraction implementation; - Data wrangling and ABT table construction; - Data cleaning. Data Exploration: - Further deep dive into web analytics concepts and website structure; - Initial data exploration; - Building an initial set of insights to provide business for immediate actions. Modelling: - Selection of models to be implemented; - Feature selection; - Implementation of algorithms selected; - Models assessment and winner selection. Results and Solution Implementation: - Interpretation of model results; - Validation of results with stakeholders; - Building a set of recommendations based on first insights and model results; - Proposal for project implementation. The table below, instead, provides an indication of the planned duration for each of the phases at the beginning of the project and the actual duration. As it can be noticed, the delays experienced in the data extraction and cleaning and data exploration phases had inevitably negative effects on the timing for the other phases. Phase Planned duration/ Actual duration Business Understanding 6 weeks / 6 weeks Data extraction and cleaning 9 weeks / 16 weeks Data exploration 5 weeks / 7 weeks Modelling 9 weeks / 3 weeks Result interpretation and implementation 6 weeks / 4 weeks Table 3. Project phases, planned vs actual duration
16 The whole project from data wrangling and cleaning to modelling has been developed in R programming language, by using the following R packages: - dyplyr; - readr; - sqldf; - tidyr; - naniar; - caret; - RandomForest; - Rpart; - ROSE. The data extraction part, as it will be better explained in the following chapters, was performed by Scitylana. Scitylana is a tool that allows to extract raw data from Google Analytics, avoiding sampling and making information available to the highest level of granularity. Data were then stored on Google BigQuery. 3.2 BUSINESS UNDERSTANDING AND SCOPE DEFINITIONS The first phase of the project consisted in exploring the business within its operational areas, product families and products portfolio with the objective of shedding a light on the functional units which were going to be impacted the most by the final outcomes. At first, an overall analysis has been conducted based on the informative material that had been made available by the company, alongside with the public information which could be found on the website. This has been an important step in order to understand the business contextualization and position in the market, other than focusing on its organization within the business units, how and with which products was able to reach every market segment. For the scopes of the project, it was really important understanding how the business operates and through which channels sells its products. The digital channel turned out to be the one with the lowest percentage of insurance policies sold, fact that reinforced the importance of this project’s objectives: an improved user experience would inevitably reflect in an increase of the profitability for this sales channel. Focus has been put on how the digital department had conducted its analytical activity so far and key points of improvements have been spotted during this phase of research. The way the activity on the website has been monitored up to the moment the project started, was through the Google Analytics online platform. This provides high level visualization on the website audience composition, but it doesn’t allow to drill down to a user level information. Also it makes it impossible to make cross analysis through several features as the platform is not flexible to perform such tasks. After this step, individual interviews have been made to the subject matter experts of each area in order to get a more operational understanding of the underlying processes from whom was daily involved in the core activities characterizing that area. Furthermore, this step was crucial for
17 gathering insights on how the project could help to ease their day to day activities and detecting potential challenges that could be faced during the project development. Within the important considerations that were taken from this first phase there was the fact that the project needed to be developed and implemented in synergy with the Digital department, also identified as the main stakeholder, in order to enhance their work and avoid useless overlapping of activities. Furthermore, from all the meetings held with the area responsible, it emerged a unified need of making the most out of the online users’ behavior before they would become their customers in order to increase proactivity on the business side and ease the acquisition. Proactive actions that have been mentioned during the meetings were targeted advertisements, enhanced pricing procedures and tailored new products launching strategies. Finally, key takeaway was that the digital channel was the way that the business had to acquire customers at the lowest cost, therefore it was important to improve it in order to leverage its performance and contribute to increase profitability. Regarding the potential risks and challenges of the project mentioned by the stakeholders there were the difficulties in accessing the web data at a hit level, poor footprint of the customer linked to its online behavior and the low level at which the web development framework of the company was. At the end of the meetings with the responsible of each area, it was then defined that the main stakeholders of the project could be identified in the following departments, along with the potential impact that the project might have on their activities: • Digital Department: identified as the main stakeholder for this project, would benefit from an advanced analytical solution in order to better identify patterns within the website activity. This would have a positive impact on the definition of its digital strategy and make the website more dynamic and effective. The possibility of zooming in the activity of the single user, makes possible to promptly intervene and adapt the website providing contents according to some of the users features; • Marketing Department: the ability that this project would give in better understanding the footprint left by the single user while visiting the website, will have an impact on the definition of remarketing actions and tailored advertisements or promotions for the users; • Products Innovation Department: highly impacted by the project, this department would see its activities strongly enhanced by the insights provided from this solution when considering the launching of new products. Getting deeply to know the audience of the website would trigger the creation of specific strategies both in a market research phase when designing a new product but also to enhance its advertisement in conjunction with the marketing department. • Pricing Department: slightly impacted by the outcomes of this solution, it would surely benefit from an improved conversion rate of the website when defining new pricing strategies
24 As it can be seen in the charts below, the users tend to buy the insurance on the website during the middle of the week, while the weekend and the first days of the week are characterized by a very low conversion rate. The opposite would be expected as it is when the biggest part of the users theoretically has more free time to allocate this kind important tasks. Figure 10. Average conversions per weekday Figure 11. Average conversion rate per weekday The results of this initial data exploration have been important not only for a better understanding of the data in preparation for the upcoming phases, but also to give some meaningful insights to the digital team. This has been crucial for them in order to take some recommended actions and redesign some of the ways the traffic was canalized through the website. 3.6 DATA PREPARATION After the initial data exploration, for modelling purposes the ABT has been filtered in order for everything that happened from the moment of the conversion onward to be discarded. As the objective of the model was to predict whether or not that user would convert, there was no need of 0,82 0,96 1,22 1,12 0,8 0,44 0,32 0 0,2 0,4 0,6 0,8 1 1,2 1,4 Monday Tuesday Wednesday Thursday Friday Saturday Sunday Conversions Average Conversions per Weekday 0,152% 0,179… 0,191% 0,186% 0,166% 0,161% 0,118% 0,000% 0,050% 0,100% 0,150% 0,200% 0,250% Monday Tuesday Wednesday Thursday Friday Saturday Sunday Average Conversion Rate Weekdays Average Conversion Rate per Weekday
25 keeping information regarding what the user did after buying the policy on the website as this might influence the model’s results. The ABT was composed by categorical variables with a considerable number of levels: this could have been a problem for some models when it comes to performance. As a reference, the randomForest package in R doesn’t allow variables with more than 50 levels to be passed to the algorithm. For this reason it was necessary to reduce the levels for those variables and this has been achieved by following two approaches: - When it was possible to contextualize the variable meanings within the business, the levels have been combined into similar groups by using domain and business experience. This has been performed to variables related to pages of the website visited, geography, languages and general traffic information; - When it wasn’t possible to follow a business logic and a domain knowledge is not available, the levels have been combined by looking at the frequency in the observation and at the response rate of each level. This criteria has been applied to all the variables related to device utilization and funnel goals. The preprocess function of the caret R package has been used to center and scale the numerical variables in preparation for the next phases. Another task that has been performed during this phase was balancing the dataset. As previously mentioned, the dataset was highly unbalanced with 98% for the negative class and 2% for the positive class: in order to correct this unbalance, the minority class has been overbalanced to achieve a 80/20 distribution. This has been possible by using the ROSE R package which allows to random oversampling the minority class. 3.7 MODELLING In this phase of the project, the algorithms have been selected and fed with the data that have been prepared along the previous phases. As it has been highlighted in the previous chapters, the data extraction and wrangling process took the majority of the time allocated for the project, leaving the rest of the phases with a considerable time constraints. For this reason, only the baseline model for each of the selected algorithm has been implemented as a proof of concept. Another reason behind of this choice was the latency and business context, other than the need of making the models as simple as possible for easier interpretation and faster interpretation. The three algorithms that have been implemented in this phase were: • Decision Tree; • Logistic Regression; • Random Forest.
26 While for the random forest no feature selection is needed as per the nature of the algorithm itself, for the rest of the models implemented the features have been selected by using the importance of the randomForest R package. This function returns the list of the features with the relative importance: the top 10th percentile has been selected as input variables for Decision Tree and Logistic Regression. Considering the problem, to prevent overfitting a K-fold cross validation has been performed while implementing DecisionTree and LogisticRegression. This has been possible by using the function included in the R package caret, which is the one that has been used in order to train these two models. Accuracy, Precision, Recall, Kappa, F1 and Balanced Accuracy have been used in this case study to assess the performance of the implemented models on validation set. Since the data are highly unbalanced, considering the accuracy as a reference metric was not enough to evaluate the models and therefore the balanced accuracy has been introduced. Model Accuracy Precision Recall Kappa F1 Balanced Accuracy RandomForest 0.99 0.78 0.62 0.69 0.68 0.80 DecisionTree 0.92 0.13 0.75 0.20 0.22 0.84 LogisticRegression 0.97 0.18 0.29 0.21 0.23 0.64 Figure 12. Metrics per algorithm implemented Considering the metrics in the table above obtained when running the model on the test set, the selected winning model was Random forest as it was the one with higher values for most of the metrics. 3.8 RESULTS INTERPRETATION The probabilities output of the winning model have been reconciled with the dataset to perform some results interpretation. The graph below shows that errors have a negative impact on users’ experience: the more error they get while browsing the website, the lower is the probability for them to convert. Included in this category there can be found general website backend errors and wrong actions performed by the user during its browsing like wrong password or wrong dates inserted.
27 Figure 13. Average errors per conversion probability The graph below shows how users with lower probabilities of converting have less visits through the Paid Search channel compared to the ones with an high probability: actions could be taken to redirect resources for the Paid Search Campaigns from the second group to the first one in order to increase the conversion rate. As a reminder, channel groupings are ruled-based grouping of the website’s traffic sources: Paid Search channel includes traffic coming through the ads posted on the search engines (Google, Bing), Organic channel includes traffic coming through the search engines non paid and Direct is the way the user arrives on the website by directly typing the website address in the bar of the browser. Figure 14. Channel grouping distribution per conversion probability When it comes to analyzing the differences in visited pages across probability groups, it turned out that users with lower probabilities of converting tend to browse more the website. This could imply that the users do not have enough information regarding general insurance terms, other than the product itself. Indeed, those users before converting tend to visit the pages in the Customer Support category, which are basically the pages where customers and perspective customers ask questions. A 6,6 12,6 6,9 7,8 7,2 4,2 3,3 3,6 1,8 Conversion Probability Average # Errors per Conversion Probability 8% 3% 4% 12% 4% 29% 14% 20% 20% 47% 30% 56% 41% 32% 12% 14% 32% 30% 8% 3% 7% 6% 37% 64% 33% 41% 64% 59% 71% 48% 50% Conversion Probability Channel Grouping Distribution per Conversion Probability Paid Search Other Channel Grouping Organic Search Direct 0% 100% 100% 0%
28 considerable percentage of these users, moreover, asked to be contacted by the contact center in order to clarify their doubts. Figure 15. Percentage of users per conversion probability level per page visited 11% 63% 11% 15% 79% 21% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% Customer Support Private Area Homepage Simulator Conversion probability 30%-40% Conversion probability 70%-80%
29 4. SET OF RECOMMENDATIONS The last deliverable of the project, as mentioned earlier during the project contextualization, was a set of recommendations to provide to the digital team in order for them to start taking proactive actions and slowly drive the website performance to an increase in the online policies conversion rate. This set of recommendations has been built based on the results of the enhanced advanced analytical tasks performed on the website data and on the model’s output, and it was aimed to both help enhancing the website optimization and furtherly develop the predictive modelling part. First of all, a remark has been made on why getting user level data is important in this type of scenarios: having the complete footprint of the users that visited the website allows a better understanding of its activities and highlighted features, other than taking the appropriate proactive actions for acquisition and retention between others. During the advanced analytics phase, the following scenarios have been spotted and deeply investigated: - Some users were shown as they had converted multiple times, but by crossing the information with the company internal database, it has been found out that only one policy was successfully payed and therefore issued. This highlights the fact that relying on the aggregated information available on the Google Analytics platform, might lead sometimes to wrong metrics calculations; - It was also by crossing web traffic data with the internal information that has been spotted a small percentage of users that bought the policy only to get a promotional voucher and cancelled straight after one month. This could be a flag for the marketing department which could think to plan and implement differently their campaign in order to avoid this loss of profit; - As mentioned during the data cleaning phase, several conversion and simulations were not shown in the Google Analytics platform as they were mistracked by the backend system. Again, this on a large scale might lead to not have the exact and clear picture of simulations and conversion. Coming to the recommendations, the first part concerns more the further developments that could be done in order to improve the prediction of the users’ behavior and implement the correlated proactive actions. More precisely: - By taking into account the output probabilities of the model, it would be possible to restrict the target audience and optimize costs and resources allocation to leverage conversions on those users that are more likely to buy the insurance policy on the website; - When more data are available, it would be possible to perform some time series forecasting on the website activity in terms of sessions, visits and purchases, in order to identify the time when the online campaigns would be more effective. Also, predicting the time in which the website will receive the highest number of requests in terms of users’ access, it would allow the digital team to provide the website with the needed resources in order to improve in efficiency;
30 - Having a way to cross online data with the internal information, would allow this solution to be integrated with other data science projects currently up and running in the company in order to furtherly clarify the position of the customers. The second part of this set of recommendations concerns more the improvements that could be done to the analytics and website optimization tasks in order to get the most out of the information that is pulled regarding the users’ interactions with the website. In details: - It was proposed to ask the email of the customer at the act of the simulation of the insurance policy’s price. This could be implemented as a new step in the simulation process on the website and validated with an A/B test in order to evaluate the impact on the user experience. Having the email of the customer at the act of the simulation would allow to have an additional way of tracking the user, other than improve the acquisition and followup campaigns. - Since a small percentage of users shown different location while browsing the website during the time frame considered, another recommendation is to track the localization change through all the users’ visits to the website. This could be implemented by using an external tool to the one that it’s currently used to track the website and it could be useful to have this information in the moment when the users has been visiting the website from abroad and then starts visiting it from Portugal. This could be flag saying that a user has been reading about the insurance before moving to Portugal and it might be interested in buying one; - One of the main critical points raised during the data exploration was that main users don’t convert or struggle with the conversion process because they’re not familiar with the general insurance terms or with the products themselves. The recommendation here is to implement pop up banners on the website whenever the user is spending more time than average on the pages part of the conversion funnel. This could prevent the user leaving the website because of confusion, resulting in a missed conversion.
31 5. IMPLEMENTATION OF THE SOLUTION For this project, a trial version of the Scitylana tool has been used in order to develop a proof of concept. In order to proceed with the data extraction, a business version of the software needs to be purchased by the business. It is important during the implementation to keep the same settings that have been used to set up the extraction process for this project, in order to keep continuity in the data structure and consistency in the code implemented. Once the account for the business version is set up, the external tool will start tracking and extracting daily data regarding the activity of the users audience on the website and dump a .txt file on a cloud storage. The storage account needs to be identified within the market offer and set up as a project dedicated data lake (Amazon Web Services, Microsoft Azure or Google Cloud Platform). The dumping of the file will serve as a trigger for the whole process described along the report to be run and have refreshed daily probabilities per each user.
32 6. CONCLUSIONS AND FUTURE WORKS In the current scenario, it is essential for a business to get to know its current and potential customers in order to tailor targeted action and improve retention and conversion rates. The main scope of this project was to deliver a solution able to implement advanced analytics techniques, by enhancing the existing analytical framework of the website monitoring. This would have positive impact on the objective of increasing the online conversion rate by improving the online user experience. Also, this new analytical approach is supposed to support decisions within the other departments of the company who might benefit from having more precise insights regarding the activity of the website. During the implementation of this project, the key aspect was to identify a way of retrieving data under the highest granularity level possible, in order for machine learning techniques and more adhoc and deep analysis to be conducted on the behavior of the user on the website. After testing several options, an external tool that works as a plugin for Google Analytics has been selected and the data extraction has been implemented. The data extracted was then appended every day into a raw table. At the end of the extraction period, an ABT table has been built in order to be able to perform an initial data exploration. Three baseline models have then been implemented in order to predict the probability for users to buy an insurance policy on the website. The last deliverable for this project was then a set of recommendations for the digital department in order to implement some changes for an immediate improvement in the user experience. A key challenge that has been faced during the development of this project was the availability of data: the tools that the business had weren’t able to capture information regarding the single user footprint on the website. Moreover, once the external tool has been implemented, it was found out that historical data could not have been accessed. This has negatively impacted the project in two ways: first, it was necessary to wait a considerable amount of time in order to get enough data to model with, which resulted in a long delay. Also, the poorness in the volume of the data didn’t leave too much space in experimenting and implementing further techniques rather than the ones descripted in the document. Another critical limitation that this project has spotted is the lack of a CRM (Customer relationship management) system implemented within the company: this makes it harder to keep track of the interaction that the business has been having with the customers so far and leaves out important details which could somehow impact the results obtained. It is hard to quantify in monetary and performance terms the benefits that the outcome of this project brought to the company: the proof of concept nature of this solution and the many challenges faced during the development of the project, make it hard to evaluate the general impact that the solution provided had on the business operations. Also, the recommendations given as a deliverable of this project were complex and their implementations within the website required resources in terms of timing and labor that go beyond the duration of this project.
33 However, with the development of this project the business has been provided with a new tool that will drastically reduce the time that was beforehand spent in manual analysis and provide the business with more precise data driven insights. Once fed with fresh new data, the predictive model developed can give updated probabilities of conversion for each user: these probabilities can be used, along with other attributes extracted during this project, to better define advertisement actions. For example, if the probability of conversion for a user is higher than a fixed threshold and the user has been visiting determined pages of the website, tailored advertisement campaigns could be sent out to that customer. Furthermore, the possibility of crossing the internal data with the website activity information for the users that are already customers, makes it possible to enrich the clustering techniques already implemented within the business to improve the customer segmentation. Within the lessons learned during this internship, it needs to be mentioned that the writer got the opportunity to learn how to get the maximum out of the limited resources that sometimes we find ourselves to work with. Also very important was learning how to work with several business stakeholders and communicate the results obtained by the tasks performed: it’s crucial to understand the business perspectives and link them with the insights coming out from the data.