rym_get_data {rym} | R Documentation |
Load data by compatible with the 'Google Analytics Core Reporting API'
Description
The Reporting API allows you to obtain information about site visits statistics and other data without using the Yandex.Metrica interface.
Usage
rym_get_data(direct.client.logins = NULL, counters,
metrics = "ym:s:visits,ym:s:pageviews,ym:s:users",
dimensions = NULL, filters = NULL,
sort = NULL, date.from = "8daysAgo",
date.to = "yesterday", accuracy = "full",
include.undefined = TRUE, lang = "ru",
timezone = NULL, pretty = FALSE,
login = getOption("rym.user"),
token.path = getOption("rym.token_path"))
Arguments
direct.client.logins |
Logins of Yandex.Direct clients, separated by commas. Can be used to generate a Direct Expense report. |
counters |
Counter identifiers, separated by commas. |
metrics |
A list of metrics, separated by a comma. |
dimensions |
A list of groupings, separated by a comma. |
filters |
A list of filtring data. |
sort |
A list of metrics and dimension for sorting result data, for desc sorting use -. |
date.from |
Start date in YYYY-MM-DD. |
date.to |
End date in YYYY-MM-DD. |
accuracy |
Sampling level, one of low, medium, high or full. Or numeric from 0 to 1, where 1 - no sampling. |
include.undefined |
Includes in response rows for which grouping values are not defined. |
lang |
Language, by default ru |
timezone |
Timezone for time data. |
pretty |
Specifies the formatting of the result. |
login |
character, Your Yandex login |
token.path |
character, Directory for store API credential |
Details
This API have some limits. 1. 10 demensions in the query. 2. 20 metrics in one query. 3. Limit: the number of unique groupings and metrics is up to 10, the number of individual filters is up to 20, the length of the line in the filter is up to 10,000 characters.
Value
Data frame with dimension and metrics.
Author(s)
Alexey Seleznev
References
Run vignette("rym-reporting-api", package = "rym")
to see the corresponding vignette.
See Also
For load statics you also can use rym_get_ga
and rym_get_logs
Examples
## Not run:
test_data <- rym_get_data(counters = 26841129,
dimensions = "ym:s:date,
ym:s:lastsignTrafficSource",
login = "my_login",
sort = "ym:s:date")
## End(Not run)