rym-package {rym}R Documentation

R Interface to Yandex Metrica API

Description

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>.

Details

The DESCRIPTION file:

Package: rym
Type: Package
Title: R Interface to Yandex Metrica API
Version: 1.0.6
Authors@R: c(person(given = "Alexey", family = "Seleznev", role = c("aut", "cre"), email = "selesnow@gmail.com", comment = c(ORCID = "0000-0003-0410-7385")), person(given = "Netpeak", role = c("cph")))
Maintainer: Alexey Seleznev <selesnow@gmail.com>
Description: 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>.
Depends: R (>= 3.5.0)
BugReports: https://github.com/selesnow/rym/issues
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
License: GPL-2
Imports: httr, stringr, utils, purrr
URL: https://selesnow.github.io/rym/
Encoding: UTF-8
Language: ru
Author: Alexey Seleznev [aut, cre] (<https://orcid.org/0000-0003-0410-7385>), Netpeak [cph]

Index of help topics:

rym-calls               Manage callss
rym-expense-uploading   Manage Cost Data Upload
rym-offline-conversion
                        Manage offline conversions
rym-package             R Interface to Yandex Metrica API
rym_add_goal            Create goal in 'Yandex Metrica'
rym_add_segment         Create segment in 'Yandex Metrica'
rym_auth                Authentication in Yandex Metrika API
rym_get_counters        Load Yandex Metrica counters
rym_get_data            Load data by compatible with the 'Google
                        Analytics Core Reporting API'
rym_get_direct_clients
                        Load Yandex.Direct clients
rym_get_filters         List of filters
rym_get_ga              Work with 'compatible with the Google Analytics
                        Core Reporting API (v3)'
rym_get_goals           List of goals
rym_get_logs            Get raw data from yandex metrika.
rym_get_my_logins       Show list of auth logins
rym_get_segments        List of segments
rym_users_grants        List of users permissions

Author(s)

NA

Maintainer: Alexey Seleznev <selesnow@gmail.com>

References

Officialrym documents

Management API Documents

Reporting API Documents

API Compatible with Google Analytics Core API v3

Logs API Documentations

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")

Examples

## 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)

[Package rym version 1.0.6 Index]