dfp_getReportDownloadURL: ReportService

Description Usage Arguments Details Value See Also Examples

Description

Provides methods for executing a ReportJob and retrieving performance and statistics about ad campaigns, networks, inventory and sales. Follow the steps outlined below:

<h4>Test network behavior</h4> The networks created using NetworkService#makeTestNetwork are unable to provide reports that would be comparable to the production environment because reports require traffic history. In the test networks, reports will consistently return no data for all reports.

Usage

1
dfp_getReportDownloadURL(request_data, as_df = FALSE, verbose = FALSE)

Arguments

request_data

a list or data.frame of data elements to be formatted for a SOAP request (XML format, but passed as character string)

as_df

a boolean indicating whether to attempt to parse the result into a data.frame

verbose

a boolean indicating whether to print the service URL and POSTed XML

Details

getReportDownloadURL

Returns the URL at which the report file can be downloaded. The report will be generated as a gzip archive, containing the report file itself.

Value

a data.frame or list containing all the elements of a getReportDownloadURLResponse

See Also

Google Documentation for getReportDownloadURL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
request_data <- list(reportJob=
                       list(reportQuery=
                              list(dimensions='MONTH_AND_YEAR', 
                                   dimensions='AD_UNIT_ID',
                                   adUnitView='FLAT',
                                   columns='AD_SERVER_CLICKS', 
                                   dateRangeType='LAST_WEEK')))

# the result is a list and most importantly the ID is included for checking its status
dfp_runReportJob_result <- dfp_runReportJob(request_data)

# only run after the status is "COMPLETED"
request_data <- list(reportJobId=dfp_runReportJob_result$id, exportFormat='CSV_DUMP')
dfp_getReportDownloadURL_result <- dfp_getReportDownloadURL(request_data)

## End(Not run)

rdfp documentation built on June 6, 2019, 1:02 a.m.