QueueTrended: Run a Trended Report

Description Usage Arguments Details Value Examples

View source: R/QueueTrended.R

Description

A QueueTrended report is a report where a single metric is retrieved, broken down by an element such as page, eVar, prop, etc. and with a time component. Within the 'element' list, either the "Top X" number of elements can be received or you can specify the specific elements you are interested in (such as 3 specific page names).

Usage

1
2
3
4
5
6
QueueTrended(reportsuite.id, date.from, date.to, metrics, elements, top = 0,
  start = 0, selected = c(), search = c(), search.type = "or",
  date.granularity = "day", segment.id = "", segment.inline = "",
  classification = character(0), anomaly.detection = FALSE,
  data.current = FALSE, expedite = FALSE, interval.seconds = 5,
  max.attempts = 120, validate = TRUE, enqueueOnly = FALSE)

Arguments

reportsuite.id

Report suite id

date.from

Start date for the report (YYYY-MM-DD)

date.to

End date for the report (YYYY-MM-DD)

metrics

List of metrics to include in the report

elements

List of elements to include in the report

top

List of numbers to limit the number of rows to include (top X). eg. c(10,5)

start

Start row if you do not want to start at #1

selected

List of specific items (of the first element) to include in the report - e.g. c("www:home","www:search","www:about")

search

List of keywords for the first specified element - e.g. c("contact","about","shop"). search overrides anything specified using selected

search.type

String specifying the search type: 'and', or, 'or' 'not' (defaults to 'or')

date.granularity

Time granularity of the report (year/month/week/day/hour), default to 'day'

segment.id

Id(s) of Adobe Analytics segment to retrieve the report for

segment.inline

Inline segment definition

classification

SAINT classification to use in place of first element. Need to specify element AND classification.

anomaly.detection

Set to TRUE to include forecast data (only valid for day granularity with small date ranges)

data.current

TRUE or FALSE - whether to include current data for reports that include today's date

expedite

Set to TRUE to expedite the processing of this report

interval.seconds

How long to wait between attempts

max.attempts

Number of API attempts before stopping

validate

whether to submit report definition for validation before requesting the data.

enqueueOnly

only enqueue the report, don't get the data. returns report id, which you can later use to get the data

Details

The QueueTrended report is analogous to pulling a "trended" report within Adobe Reports & Analytics, but without the limitation of only 5 elements as in the Adobe Reports & Analytics interface.

Because of the Reporting API structure, this function first requests the report, then checks the reporting queue to see if the report is completed, and when the report returns as "done" pulls the report from the API. This checking process will occur up to the specified number of times (default 120), with a delay between status checks (default 5 seconds). If the report does not return as "done" after the number of tries have completed, the function will return an error message.

Note: Because of the multiple argument type ("top" and "start" OR "selected"), keyword arguments are generally needed towards the end of the function call instead of just positional arguments.

Value

Data frame or report id, if enqueueOnly is TRUE

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
report.data <- QueueTrended("your_report_suite",
                            "2014-01-01",
                            "2014-01-07",
                            c("visits","uniquevisitors","pageviews","event10"),
                            c("page","geoCountry","geoCity")
                            )

## End(Not run)

randyzwitch/RSiteCatalyst documentation built on May 11, 2020, 3:05 p.m.