Title: | Loading Criteo Data into R |
---|---|
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. |
Authors: | Johannes Burkhardt <[email protected]> |
Maintainer: | Johannes Burkhardt <[email protected]> |
License: | GPL (>= 2) | MIT + file LICENSE |
Version: | 1.0.2 |
Built: | 2025-01-28 02:36:53 UTC |
Source: | https://github.com/banboo-data/rcriteo |
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}
.
criteoData(authToken, appToken, jobID)
criteoData(authToken, appToken, jobID)
authToken |
Object created by |
appToken |
App Token as character string. |
jobID |
Object created by |
Data
Initiate the Criteo API authentication process. The function returns the authentication token.
doCriteoAuth(user, password, company, app, version)
doCriteoAuth(user, password, company, app, version)
user |
Username |
password |
Password |
company |
Company Name |
app |
App Name of API project |
version |
API version |
AuthToken
This function returns the Criteo Account Information.
getCriteoAccount(authToken, appToken)
getCriteoAccount(authToken, appToken)
authToken |
Authentication token generated by |
appToken |
Application Token |
Account Information
This function returns the Criteo Campaign Information.
getCriteoCampaigns(authToken, appToken)
getCriteoCampaigns(authToken, appToken)
authToken |
Authentication token generated by |
appToken |
Application Token |
Campaign Information
This function returns the requested data as a data frame.
getCriteoData(URL, jobID)
getCriteoData(URL, jobID)
URL |
Report download URL created by |
jobID |
jobID generated by |
Data
This function returns the download Url of the report.
getCriteoDownloadURL(authToken, appToken, jobID)
getCriteoDownloadURL(authToken, appToken, jobID)
authToken |
Authentication token generated by |
appToken |
Application Token |
jobID |
jobID generated by |
Download URL
This function return the status of the scheduled report generated by scedCriteoReport
.
getCriteoJobStatus(authToken, appToken, jobID)
getCriteoJobStatus(authToken, appToken, jobID)
authToken |
Authentication token generated by |
appToken |
Application Token |
jobID |
jobID generated by |
Job status (Pending or InProgress or Completed or Failed)
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.
Johannes Burkhardt <[email protected]>
https://github.com/jburkhardt/RCriteo
## 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)
## 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)
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.
scedCriteoReport(authToken, appToken, campaigns, metrics, start, end)
scedCriteoReport(authToken, appToken, campaigns, metrics, start, end)
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" |
Report job ID