Establishing Standard Rules for Choosing Best KPIs for an E-Commerce Business based on Google Analytics and Machine Learning Technique

The predictable values that indicate the performance of any company and determine that how well they are performing in order to achieve their objective is referred by the term called as “key performance indicators”. The key performance indicator techniques and other methods that are similar to KPI are usually implemented in the businesses that are running online, but for an e-commerce business, it is always difficult to select the right KPI. As long as the KPIs are concerned, the biggest blunder that an online business can make is that they calculate everything along with the KPIs. But whatever they are calculating cannot be referred as the “key” because they are measuring each and everything, so this can immediately become devastating. The need is to only measure certain specific keys in order to calculate the performance of a business. The main aim of this research is to establish the set of standard rules that must be adopted in order to identify the best KPIs for an e-commerce business website based on google analytics and machine learning technique. Keywords—E-commerce KPI; Google Analytics; Machine Learning; C4.5 Decision Tree; Weka J48


INTRODUCTION
This paper will briefly give the overview of the Google analytics and also highlight the Google analytics KPIs for the websites based on e-commerce.It will also elaborate the techniques of machine learning in order to find the right KPI for the business based on e-commerce.Google analytics is the most useful and common tool of measuring and monitoring the performance of any website [1].Key performance indicators are the method by which we can calculate the performance of something.As long as the e-commerce websites are concerned the KPIs are the multiple features that provide assistance to the webmasters or owners to determine the performance of their websites.In e-commerce websites, the KPIs have their own importance because these are the tools to measure the success of any website.There are many KPIs for the e-commerce website, some of which are: Website traffic, the rate of conversion, bounce rate, purchase time, repetition of the visits, abandon rate of the cart, conversion cost.For the success of any website, it is important for the webmaster to keep track of all of the above mentioned KPIs [2].In this paper, the machine learning technique is described briefly in order to find the right KPIs for the online business.There are various machine learning techniques but in this research paper, we will focus on the decision tree in order to find out the right KPI on the e-commerce business.A decision tree is a simple tree on which the non-terminal nodes depict the test on one or more than one traits whereas the terminal nodes depict the decision results.The initial decision tree that was algorithm induction ID3 [3] was promoted by C4.5.This paper provides the extensive study on the topic of Creating standard Rules for Choosing Best KPIs for an e-Commerce business based on Google Analytics through Machine Learning.

II. GOOGLE ANALYTICS INSTALLATIONS
To track the KPIs of the e-commerce sites by using the GA software it is necessary to first install the tracking codes on such websites.

A. Google Analytics Tracking Code Installation Steps 1)
On your analytics account first sign in.
2) Click on admin tab.
3) In the drop down menu on the column of an account click on account.
4) In the property column go to the drop down menu and select property.
5) Click on Tracking info and then tracking code under the property tab.
6) GA tracking ID and code will be displayed on screen as shown in Figure 1.
7) Add tracking code or tracking ID to your site or app to collect the data.www.ijacsa.thesai.org

B. Google Analytics Audience Overview
In Figure 2, the report on GA audience overview is depicted which clearly shows the overview of the performance of the website of the online business including, session numbers, the number of users; both new and those who are returning to the website, the duration of the average sessions, the bounce rate and the sessions that are new [7].

III. SET UP E-COMMERCE TRACKING
To see E-commerce data in Google Analytics reports, enable E-commerce for each view in which we want to see the data.

B. Google Analytics Ecommerce Overview
The report that is shown in Figure 3 depicts the report of ecommerce that enables you to examine the activity of purchase on your application.You will be able to see the information about the product and the transaction, average value of the order, the rate of e-commerce conversion purchase time or any other useful information.

IV. KPI FOR AN E-COMMERCE BUSINESS
Common KPIs for an e-commerce business can be categorised into three dimensions presented in Table 1.
3) Customer Service KPIs.KPIs can help the e-commerce business to make well versed-decisions.The indicators like pages that are visited and the time spent on a certain site help to determine the views of the visitors about your product, whether they are just steering the page or do the window shopping or they are interested in your product [8].

V. RESEARCH METHODOLOGY
The research methodology includes: at the starting point we first locate all the KPIs that are associated with the ecommerce business; then with the help of Google analytics tool we determine the score of KPIs.After the determination of the KPI score, we then find the Correlation between the score of KPIs and the revenue that is generated on monthly basis.The last step is to apply the decision tree C4.5 algorithm to develop the rules for best KPI selection for an e-commerce business.In Figure 4 the steps of research methodology are indicated.www.ijacsa.thesai.org

VI. E-COMMERCE WEBSITE KPI SCORE
With the help of GA and medium sized online shopping store, the twelve KPIs scores were determined.The Table 2 shows the average scores of each KPI in different duration of time.

TABLE II. E-COMMERCE WEBSITE KPI SCORE
The major goal of the business of e-commerce is to elevate the success of its sales and to enhance the generation of revenue [9].As indicated in Table 2, we can find the revenue that is generated on the monthly basis by the use of Google analytics, the statistics show that for the month of May to July, August to October and November to July the average revenue is $15.7K, $27.5K and $21.3K respectively.In order to find the association between the of each e-commerce KPI and the revenue; we calculate the correlation coefficient between each e-commerce KPI score and revenue.

VII. THE CORRELATION COEFFICIENT
A correlation coefficient is an arithmetical measure of the amount to which variations to the value of one variable forecasts variation in the value of another [10].If the variables are positively correlated with each other than their value increase or decrease simultaneously on the other hand if the values of these variables are negatively correlated than the value of one increases decreasing the value of others.
It is easy to understand the calculation of two coefficients that are correlated with each other.Imagine that these coefficients are X and Y respectively.The zX and the ZY are the standardised version of the X and Y and let us suppose that the mean of zX and ZY is 0 and the standard deviation is 1 respectively.In Equation 1 and 2, the re-expressions are used in order to find the identical scores.
The definition of the correlation coefficient is stated as the mean product of the standardised score that is clearly shown in the equation number 3.   3 presented the value of correlated coefficient between scores of each KPI and the revenue that is generated in the different duration of time.
Step 1 • Set all KPIs related to e-commerce business Step 2 • Tracking the web metrics/KPIs score through google analytics Step 3 • Find correlation b/w KPI score and monthly revenue Step 4 • Generate decision tree C4.5 by using weka J48 Step 5   In the next stage the categorical data is provided as an input to Weka J4.8 to generate Decision tree C4.5.

VIII. DECISION TREE C4.5
The controlled approach of classification is represented by the decision tree.A decision tree is a type of a tree that is simple to describe on which the non-terminal nodes depict the test on one or more than one traits whereas the terminal nodes depict the decision results.The initial decision tree that was algorithm induction ID3 [3] was promoted by C4.4 [4,5].The package of WEKA classifier has its own form of C4.5 that is referred as J4.8.The C4.5 uses the measures of information gain and ratio of gain as the criteria of splitting respectively [11].The decision tree follows the steps that are stated below: Step 1: The assumption is being made that n will be the output test and set T is acting as a tuple training sample for the class label, the training sample T then categorised into the various subsets {T1, T2, ... Tn}.So that we will be able to measure the entropy of the sample T (in bits): Step 2: According to the particular value of property the sample T is divided, Then the property T's information entropy is: Step 3: The difference between the original requirement of the information and the new one [6] is referred as the information gain.With the help of Eq. ( 4) and Eq. ( 5), we may be able to find a gain standard that is given as: Step 4: There is a flaw associated with the gain standard that the examination has many variations from the different situations of output but on the other hand the gain standard is useful to develop the compact decision tree.So it must be given by standardisation that is indicated as: The gain standard that we find is: In Table 6 the KPI training data set is depicted and it is presented as the input to Weka J48 1) Develop a set of data by using MS Excel, MS Access or any other tool and then save it in the format of CSV.
2) Weka explorer is then started in the next step.
3) The next step is to Open your CSV file and then save it in the format of ARFF.
4) From the choose button select the J48 after clicking on the classify tab.

5)
Any suitable test option is selected in the second last step.
6) The result will be shown after clicking on the start button this is the last step.
To view the graphical form of a decision tree, click on the option "visualise tree" which is present in pop-up menu of result list.In Figure 5, the graphical view of a tree is shown which is created by Weka J48.

XI. CONCLUSION
The tracking of KPI is a great technique to monitor and manage an e-commerce website that connects the consumers to thousands of different e-commerce sellers.Every separate e-commerce website is dissimilar so to enhance the functioning performance with the help of KPIs, each ecommerce seller should choose KPIs which are best related to their online trade.There is no standard rule for choosing correct KPIs for an e-commerce business.In this research, we proposed a technique to develop the standard rules for choosing the best KPI for an e-commerce website through the use of Google analytics and decision tree method.

1 ) 3 ) 4 ) 5 ) 6 )
First on analytic account you need to sign in.2) Click Admin then navigate to the view.Select e-commerce setting in the column of view.Click the Enable e-commerce toggle ON.Click on the Next step.Click on Submit.

n
shows the size of the sample.

Fig. 5 .
Fig. 5. Graphical Representation of Decision Tree C4.5 Using Weka J48 X. RULE GENERATION USING DECISION TREE FOR CHOOSING BEST KPI FOR AN E-COMMERCE BUSINESS The Corresponding Rules Are: R1: IF (Correlation b/w KPI_Score & Monthly_Revenue= Weak) THEN Adopt KPI= No R2: IF (Correlation b/w KPI_Score & Monthly_Revenue= Moderate) THEN Adopt KPI= No R3: IF (Correlation b/w KPI_Score & Monthly_Revenue= Strong) AND (Avg.KPI_Score=Low) Then Adopt KPI= No R4: IF (Correlation b/w KPI_Score & Monthly_Revenue= Strong) AND (Avg.KPI_Score=Medium) Then Adopt KPI= Yes R5: IF (Correlation b/w KPI_Score & Monthly_Revenue= Strong) AND (Avg.KPI_Score=High) THEN Adopt KPI= Yes There are two classifications of the rules that are "YES" or "NO".The following study reveals only one of the decision rule for each of the class and they are stated as below A. "NO" Class Rule: R1: IF (Correlation b/w KPI_Score & Monthly_Revenue= Weak) THEN Adopt KPI= No It specifies that when Correlation between KPI Score and Monthly Revenue is equal to weak then respective KPI is not nominated for calculating the performance of the e-commerce business.In addition to this, nine examples of training data set support the rule.

TABLE III .
CORRELATION COEFFICIENT B/W KPI SCORES & REVENUE Table As a part of pre-processing the continuous data set of KPI is transformed into the categorical form by the estimated width of the desired intervals, as shown in the Table4.

TABLE IV .
CATEGORICAL PARTITIONING OF E-COMMERCE KPI DATA SETThe Table5clearly shows the e-commerce KPIs' data that is converted into the categorical form.

TABLE V .
CATEGORICAL E-COMMERCE KPI DATA SET

TABLE VI .
THE TRAINING KPI DATA SET