Learn R Programming

rym (version 1.0.6)

rym-package: tools:::Rd_package_title("rym")

Description

tools:::Rd_package_description("rym")

Arguments

Author

tools:::Rd_package_author("rym")

Maintainer: tools:::Rd_package_maintainer("rym")

Details

The DESCRIPTION file: tools:::Rd_package_DESCRIPTION("rym") tools:::Rd_package_indices("rym")

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

Run this code
if (FALSE) {
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")
}

Run the code above in your browser using DataLab