The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Официальную русскоязычную документацию можно найти по этой ссылке
rym
является R интерфейсом для работы с API Яндекс
Метрики, его функции позволяют вам взаимодействовать со следующими
API:
Установить rym
можно как с CRAN так и с GitHub
CRAN: install.packages('rym')
GitHub: devtools::install_github("selesnow/rym")
Помимо официальной документации у пакета есть 5 виньеток, вводная, и отдельно виньетка под каждый API, открыть их можно с помощью следующих команд:
rym
:
vignette('intro-to-rym', package = 'rym')
vignette('rym-management-api', package = 'rym')
vignette('rym-reporting-api', package = 'rym')
vignette('rym-ga-api', package = 'rym')
vignette('rym-logs-api', package = 'rym')
# auth
rym_auth(login = "vipman.netpeak", token.path = "metrica_token")
rym_auth(login = "selesnow", token.path = "metrica_token")
# ManagementAPI
# get counters list
<- rym_get_counters(login = "selesnow",
selesnow.counters token.path = "metrica_token")
<- rym_get_counters(login = "vipman.netpeak",
vipman.counters token.path = "metrica_token")
# get goals list
<- rym_get_goals(counter = 10595804,
my_goals login = "vipman.netpeak",
token.path = "metrica_token")
# пget filter list
<- rym_get_filters(counter = 10595804,
my_filter login = "vipman.netpeak",
token.path = "metrica_token")
# get segment list
<- rym_get_segments(counter = 10595804,
my_segments login = "vipman.netpeak",
token.path = "metrica_token")
# get counter list
<- rym_users_grants(counter = 10595804,
users login = "vipman.netpeak",
token.path = "metrica_token")
# Reporting API
<- rym_get_data(counters = "23660530,10595804",
reporting.api.stat 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",
login = "vipman.netpeak",
token.path = "metrica_token",
lang = "en")
# Logs API
<- rym_get_logs(counter = 23660530,
logs.api.stat date.from = "2018-08-01",
date.to = "2018-08-05",
fields = "ym:s:date,
ym:s:lastTrafficSource,
ym:s:referer",
source = "visits",
login = "vipman.netpeak",
token.path = "metrica_token")
# API compatible with Core API Google Analytics v3
<- rym_get_ga(counter = "ga:22584910",
ga.api.stat dimensions = "ga:date,ga:source",
metrics = "ga:sessions,ga:users",
start.date = "2018-08-01",
end.date = "2018-08-05",
sort = "-ga:date",
login = "selesnow",
token.path = "metrica_token")
Автор: Алексей Селезнёв (Head of Analytics Dept. at Netpeak)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.