Get a data frame with all of the standard (non-calculated) metrics (measures) in the report suite.

aw_get_metrics(
  rsid = Sys.getenv("AW_REPORTSUITE_ID"),
  locale = "en_US",
  segmentable = "NULL",
  expansion = NA,
  company_id = Sys.getenv("AW_COMPANY_ID"),
  debug = FALSE,
  use_oob = TRUE
)

Arguments

rsid

Adobe report suite ID (RSID). If an environment variable called AW_REPORTSUITE_ID exists in .Renviron or elsewhere and no rsid argument is provided, then the AW_REPORTSUITE_ID value will be used. Use aw_get_reportsuites to get a list of available rsid values.

locale

The locale that system-named metrics should be returned in. Non-localized values will be returned for title, name, description, etc. if a localized value is not available.

segmentable

Boolean that determines whether or not to include metrics that can be used in segments. NULL (the default) and FALSE return all metrics (not just the non-segmentable ones). Examples of metrics that cannot be used in segments are bounces, bounce rate, entries, and visitors.

expansion

Additional metrics metadata to include in the results: tags, allowedForReporting, and categories. This argument takes a single value (e.g., expansion = "tags") or a vector of values (e.g., expansion = c("tags", "categories")).

company_id

Company ID. If an environment variable called AW_COMPANY_ID exists in .Renviron or elsewhere and no company_id argument is provided, then the AW_COMPANY_ID value will be used. Use get_me to get a list of available company_id values.

debug

Include the output and input of the api call in the console for debugging. Default is FALSE

use_oob

Always set to TRUE. Needed for tests

Value

A data frame of metrics (excluding calculated metrics) and their meta data.

Details

This function is commonly used to get the correct ID for a specific metric or metrics that will be used in other function calls. The results returned are:

  • All of the "out of the box" metrics like visits, page views, visitors, orders, revenue, bounce rate, etc.

  • All of the enabled events that are configured in the report suite.

  • An instances metric for each enabled eVar.

This function does not return calculated metrics.

See also