rym-package | R Documentation |
Allows work with 'Management API' for load counters, segments, filters, user permissions and goals list from Yandex Metrica, 'Reporting API' allows you to get information about the statistics of site visits and other data without using the web interface, 'Logs API' allows to receive non-aggregated data and 'Compatible with Google Analytics Core Reporting API v3' allows receive information about site traffic and other data using field names from Google Analytics Core API. For more information see official documents <https://yandex.ru/dev/metrika/doc/api2/concept/about-docpage>.
The DESCRIPTION file:
This package was not yet installed at build time.
Index: This package was not yet installed at build time.
Alexey Seleznev [aut, cre] (<https://orcid.org/0000-0003-0410-7385>), Netpeak [cph]
Maintainer: Alexey Seleznev <selesnow@gmail.com>
API Compatible with Google Analytics Core API v3
Or read vignettes:
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")
## Not run:
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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.