02 Февраль, 2016

about me

Analyst at Game Insight

Research analyst at ConsultantPlus

R-packages

  • RGoogleAnalytics
  • rga
  • ganalytics
  • RGA
  • GAR

authentication

library(RGA)
authorize()
## Access token will be stored in the '.ga-token.rds' file.

management API

management API

metrics and dimensions

case heatmap

ga_data <- get_ga(profileId = id, 
                  start.date = "2016-01-01", 
                  end.date = "2016-01-30",
                  metrics = "ga:sessions", 
                  dimensions = "ga:date",
                  filters = "ga:sessions > 0")

case heatmap

case keywords wordcloud

ga_data <- get_ga(profileId = id, 
                  start.date = "2016-01-01", 
                  end.date = "2016-01-30",
                  metrics = "ga:sessions", 
                  dimensions = "ga:keyword",
                  filters = "ga:keyword != (not provided) 
                              && ga:keyword != (not set) 
                              && ga:keyword != (other)",
                  sort = "-ga:sessions")

case keywords wordcloud

segments

get_ga(profileId = id, 
       start.date = "2016-01-01", 
       end.date = "2016-01-30",
       metrics = "ga:users, ga:sessions", 
       dimensions = "ga:city",
       segment = "sessions::condition::ga:keyword=@проективніе",
       sort = "-ga:sessions")
##        city users sessions
## 1 Mariupol'     1       40

Google Analytics samples

ga_data <- get_ga(profileId = id, 
                  start.date = "2015-12-01", 
                  end.date = "2016-01-30",
                  metrics = "ga:sessions", 
                  dimensions = "ga:keyword",
                  filters = "ga:keyword != (not provided) 
                              && ga:keyword != (not set) 
                              && ga:keyword != (other)",
                  sort = "-ga:sessions")
## API response contains more then 10000 items. Batch processing mode enabled.
## 
  |                                                                       
  |================================                                 |  50%
  |                                                                       
  |=================================================================| 100%

not mentioned

  • Multi-Channel Funnels API
  • RealTime Reporting API
  • custom reports

references and links