This is the equivalent of a freeform table with segments as the row
components. This type of table offers a few components that aw_freeform_table
does not. For example, this function does not require (or allow) dimensions
to be included in the breakdown. Segment IDs are automatically translated
into their human-readable names.
aw_segment_table(
company_id = Sys.getenv("AW_COMPANY_ID"),
rsid = Sys.getenv("AW_REPORTSUITE_ID"),
segmentRsids,
date_range = c(Sys.Date() - 30, Sys.Date() - 1),
metrics = c("visits", "visitors"),
globalSegment = NULL,
segmentIds = NULL,
debug = FALSE
)
Company ID
Report suite ID for the data pull
Deprecated.
Date range
Metrics to request for each segment
One or more segments to apply globally over all other segments
One or more segments that will compose the rows of the table
Logical, whether to make verbose requests to the API and view the whole exchange
tibble::tibble()
of segments and metrics. Rows are returned with
segments in the order they were requested, not by metric sorting.
This is a specialized function.
To see segments broken down by dimensions, we recommend making multiple
requests to aw_freeform_table
with different global segments applied, and
then row-binding them together yourself.
Unlike aw_freeform_table
, this function automatically handles the 10-metric
restriction imposed by the API.