Search code examples
rgoogle-analyticscrmweb-analytics

How to perform conversion funnel analysis with R?


 This is  my Conversion_Paths data frame:

                Path               Conversions                Conversion.Value
1 AdWords Branding                    11,625                    1,126,777.86
2 Direct / Organic                    9,378                     989,316.79
3 Direct / Organic                    8,873                     849,608.29
4 Direct / Organic > Direct / Organic 3,461                     364,757.16
5 AdWords Branding > AdWords Branding 3,140                     308,690.32
6 Mailings                            2,135                     243,292.23

Here is my case study:

Conversion Paths.csv file contains a dataset of conversion paths leading to transactions. Specific elements (i.e source channels) in a conversion path is divided by the character ">". The order of sources from left to right indicates the order a visitor has come to the website from those sources before making a transaction.

For example, For the conversion path AdWords Branding > Organic, the visitors have first reached the site by clicking an AdWords Branding advert, and after that used a search engine's organic listings for a 2nd visit before making the transaction.

Please provide an attribution analysis, and give aggregated reports for customer sources. Regardless of cost (you don't have that data here), please evaluate and rank the source channels (there can be more than a single ranking system to be considered here!).

Hint : You might want to consider how sources perform in certain positions (first,last, middle) and also conversion path lengths.

I want to perform attribution analysis with R but I dont know How to start? .Could anyone explain me like how should I start to manipuliating data, which packages I should use, useful some documents

Many thanks in advance


Solution

  • Try using "ChannelAttribution" package in R.

    install.packages("ChannelAttribution")
    

    It has in-built markov_model and heuristic_model functions which can provide the desired analysis. However you would need to transform the data.

    They have provided a sample data along with the package which can be loaded by

     data(PathData)
    

    Check the data and try remodelling your data in the format to use the in-built functions.