rym_get_logs | R Documentation |
'Logs API' allows you to receive non-aggregated data collected by Yandex.Metrica. This API is intended for service users who want to independently process statistical data and use them to solve unique analytical problems.
rym_get_logs(counter = NULL, date.from = Sys.Date() - 10, date.to =
Sys.Date() - 1, fields =
"ym:s:date,ym:s:counterID,ym:s:dateTime,
ym:s:isNewUser,ym:s:startURL,ym:s:visitDuration,
ym:s:ipAddress,ym:s:referer",
source = "visits", login = getOption("rym.user"),
token.path = getOption("rym.token_path"))
counter |
Yandex metrika counter id |
date.from |
Start date in format YYYY-MM-DD |
date.to |
End date in format YYYY-MM-DD |
fields |
List of fields |
source |
Log source, one of "hits" or "visits" |
login |
character, Your Yandex login |
token.path |
character, Directory for store API credential |
Data frame with values and fields
Alexey Seleznev
Run vignette("rym-logs-api", package = "rym")
to see the corresponding vignette.
For load statics you also can use rym_get_data()
and rym_get_ga()
## Not run:
# where "00000000" is your counter id
rawmetrikdata <- rym_get_logs(counter = "00000000",
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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.