QueueOvertime: Run an Overtime Report

Description Usage Arguments Details Value Examples

View source: R/QueueOvertime.R

Description

A QueueOvertime report is a report where the only granularity allowed is time. This report allows for a single report suite, time granularity, multiple metrics, and a single segment. It is similar to the "Key Metrics" report or a Custom Event report within the Adobe Reports & Analytics interface. To get a summary report with no time granularity (i.e. a single row), pass an empty string to the date.granularity function parameter.

Usage

1
2
3
4
5
QueueOvertime(reportsuite.id, date.from, date.to, metrics,
  date.granularity = "day", segment.id = "", segment.inline = "",
  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

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

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

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.

Value

Data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Not run: 

overtime1 <- QueueOvertime("your_report_suite",
                           date.from = "2014-04-01",
                           date.to = "2014-04-20",
                           metrics = c("pageviews", "visits", "bounces"),
                           date.granularity = "day")

overtime2 <- QueueOvertime("your_report_suite",
                           date.from = "2014-04-01",
                           date.to = "2014-04-20",
                           metrics = c("pageviews", "visits", "bounces"),
                           date.granularity = "day",
                           segment.id = "5433e4e6e4b02df70be4ac63",
                           anomaly.detection = TRUE,
                           interval.seconds = 10,
                           max.attempts = 20)

overtime3 <- QueueOvertime("your_report_suite",
                           date.from = "2014-04-01",
                           date.to = "2014-04-20",
                           metrics = c("pageviews", "visits", "bounces"),
                           date.granularity = "")
enqueued.report.id <- QueueOvertime("your_report_suite",
                           date.from = "2014-04-01",
                           date.to = "2014-04-20",
                           metrics = c("pageviews", "visits", "bounces"),
                           date.granularity = "",
                           enqueueOnly=TRUE)

## End(Not run)

RSiteCatalyst documentation built on Nov. 6, 2019, 5:09 p.m.