if (FALSE) {
library(rym)
# get counters list
my_counters <- rym_get_counter()
# join all counters id in string format, like 1,2,3,4,5,...,n
counters_ids <- paste0(my_counters$id, collapse = ",")
# get statistic from reporting API
reporting <- rym_get_data(counters = counters_ids,
date.from = "2018-08-01",
date.to = "yesterday",
dimensions = "ym:s:date,
ym:s:lastTrafficSource",
metrics = "ym:s:visits,
ym:s:pageviews,
ym:s:users",
sort = "-ym:s:date")
# get raw data
raw_data <- rym_get_logs(counter = counters_ids[1],
date.from = "2016-12-01",
date.to = "2016-12-20",
fields = "ym:s:visitID,
ym:s:date,
ym:s:bounce,
ym:s:clientID,
ym:s:networkType",
source = "visits")
}
Run the code above in your browser using DataLab