Type: | Package |
Title: | Loading Criteo Data into R |
Version: | 1.0.2 |
Date: | 2016-06-07 |
Author: | Johannes Burkhardt <johannes.burkhardt@gmail.com> |
Maintainer: | Johannes Burkhardt <johannes.burkhardt@gmail.com> |
Description: | Aims at loading Criteo online advertising campaign data into R. Criteo http://www.criteo.com/ is an online advertising service that enables advertisers to display commercial ads to web users. The package provides an authentication process for R with the Criteo API <http://kb.criteo.com/ advertising/content/5/27/en/api.html>. Moreover, the package features an interface to query campaign data from the Criteo API. The data can be downloaded and will be transformed into a R data frame. |
Depends: | R (≥ 3.1.1) |
Imports: | RCurl, XML, httr, plyr |
License: | GPL-2 | GPL-3 | MIT + file LICENSE [expanded from: GPL (≥ 2) | MIT + file LICENSE] |
Encoding: | UTF-8 |
URL: | http://jburkhardt.github.io/RCriteo/, http://www.criteo.com/, http://kb.criteo.com/advertising/content/5/27/en/api.html |
BugReports: | https://github.com/jburkhardt/RCriteo/issues |
RoxygenNote: | 5.0.1 |
NeedsCompilation: | no |
Packaged: | 2016-07-07 13:23:46 UTC; jburkhardt |
Repository: | CRAN |
Date/Publication: | 2016-07-07 15:46:36 |
Loading Criteo Data into R
Description
Aims at loading Criteo online display advertising campaign data into R. Criteo is an online advertising service that enables advertisers to display commercial ads to web users.
The package provides an authentication process doCriteoAuth
for R with the Criteo API.
Moreover, the package features an interface to query campaign data from the Criteo API with scedCriteoReport
.
The data can be downloaded with criteoData
.
getCriteoDownloadURL
generates a download link and getCriteoData
will download the data and transform it into a R data frame.
With getCriteoAccount
and getCriteoCampaigns
you can receive Account and Campaign Information.
Author(s)
Johannes Burkhardt <johannes.burkhardt@gmail.com>
https://github.com/jburkhardt/RCriteo
Examples
## Not run:
Authentication:
authToken <- doCriteoAuth(user = "userName",
password = "**********",
company = "companyName",
app = "appName",
version = "3.6")
Retrieve Campaign IDs:
getCriteoCampaigns(authToken = authToken,
appToken = '*************')
Create Statement:
jobID <- scedCriteoReport(authToken = authToken,
appToken = '*************',
campaigns = c("12345", "23345", "98765", "45639"),
metrics = c("clicks", "impressions", "cost", "sales"),
start = "2015-09-01",
end = "2015-09-06")
Download Data:
data <- criteoData(authToken = authToken,
appToken = '*************',
jobID = jobID)
## End(Not run)
Pull Criteo Campaign Report Data
Description
This function manages the complete data download process. The requested data will be returned as a data frame.
Wrapper for link{jobStatus}
, link{getCriteoDownloadURL}
and link{getCriteoData}
.
Usage
criteoData(authToken, appToken, jobID)
Arguments
authToken |
Object created by |
appToken |
App Token as character string. |
jobID |
Object created by |
Value
Data
API Authentication
Description
Initiate the Criteo API authentication process. The function returns the authentication token.
Usage
doCriteoAuth(user, password, company, app, version)
Arguments
user |
Username |
password |
Password |
company |
Company Name |
app |
App Name of API project |
version |
API version |
Value
AuthToken
Get Criteo Account Information
Description
This function returns the Criteo Account Information.
Usage
getCriteoAccount(authToken, appToken)
Arguments
authToken |
Authentication token generated by |
appToken |
Application Token |
Value
Account Information
Get Criteo Campaigns
Description
This function returns the Criteo Campaign Information.
Usage
getCriteoCampaigns(authToken, appToken)
Arguments
authToken |
Authentication token generated by |
appToken |
Application Token |
Value
Campaign Information
Get Campaign Report Data
Description
This function returns the requested data as a data frame.
Usage
getCriteoData(URL, jobID)
Arguments
URL |
Report download URL created by |
jobID |
jobID generated by |
Value
Data
Get Download Url
Description
This function returns the download Url of the report.
Usage
getCriteoDownloadURL(authToken, appToken, jobID)
Arguments
authToken |
Authentication token generated by |
appToken |
Application Token |
jobID |
jobID generated by |
Value
Download URL
Get Job Status
Description
This function return the status of the scheduled report generated by scedCriteoReport
.
Usage
getCriteoJobStatus(authToken, appToken, jobID)
Arguments
authToken |
Authentication token generated by |
appToken |
Application Token |
jobID |
jobID generated by |
Value
Job status (Pending or InProgress or Completed or Failed)
Campaign Report
Description
This function generates the campaign report statement and schedules the report. The API returns a job ID, which later will be used to receive the data from the API.
Usage
scedCriteoReport(authToken, appToken, campaigns, metrics, start, end)
Arguments
authToken |
Authentication token generated by |
appToken |
Application Token |
campaigns |
Vector of campaign IDs. Example: campaigns = c('12345', '01235', '98765') |
metrics |
Vector of metrics. Example: metrics = c('clicks','impressions','cost','sales') available metrics: clicks, impressions, ctr, revcpc, ecpm, cost, sales, convRate, orderValue, salesPostView, convRatePostView, orderValuePostView, costOfSale, impressionWin, costPerOrder |
start |
Start Date, format: "YYYY-mm-dd" |
end |
End Date, format: "YYYY-mm-dd" |
Value
Report job ID