When working with the API reports it is sometimes necessary to obtain background information about these or other query parameters to the API. To obtain a list of all the metrics and dimensions RGA package provides the list_metadata() function, which return actual informtation about all dimensions and metrics for the given report type (now support only the Core Reporting API metadata).

list_metadata() return an data.frame, which consists of the following columns:

There are several examples of usage the metadata Google Analytics API.

Examples

ga_meta <- list_metadata()

List of all outdated parameters and those ones which were replaced:

subset(ga_meta, status == "DEPRECATED", c(id, replacedBy))

List of all parameters from certain group:

subset(ga_meta, group == "Traffic Sources", c(id, type))

List of all calculated parameters:

subset(ga_meta, !is.na(calculation), c(id, calculation))

List of all parameters allowed in segments:

subset(ga_meta, allowedInSegments, id)

RGA package also provide the shiny demo app to access ga dataset:

dimsmets(ga_meta)

References