Package 'RCriteo'

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

Help Index


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 link{doCriteoAuth}

appToken

App Token as character string.

jobID

Object created by link{scedCriteoReport}

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 doCriteoAuth

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 doCriteoAuth

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 getCriteoDownloadURL

jobID

jobID generated by scedCriteoReport

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 doCriteoAuth

appToken

Application Token

jobID

jobID generated by scedCriteoReport

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 doCriteoAuth

appToken

Application Token

jobID

jobID generated by scedCriteoReport

Value

Job status (Pending or InProgress or Completed or Failed)


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 <[email protected]>
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)

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 doCriteoAuth

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