if (FALSE) {
### Please choose another TokenPath to save the Login permanently.
# For get Report from client account
statAgency <- yadirGetReport(ReportType = "ACCOUNT_PERFORMANCE_REPORT",
DateRangeType = "CUSTOM_DATE",
DateFrom = "2018-01-01",
DateTo = "2018-05-10",
FieldNames = c("AdNetworkType",
"Impressions",
"Clicks",
"Cost"),
Goals = c(182453,
182452,
234588),
AttributionModels = c("LSC", "LC"),
IncludeVAT = "YES",
IncludeDiscount = "NO",
Login = "client_login",
TokenPath = tempdir())
# For get data from agency client account
statAgency <- yadirGetReport(ReportType = "ACCOUNT_PERFORMANCE_REPORT",
DateRangeType = "CUSTOM_DATE",
DateFrom = "2018-01-01",
DateTo = "2018-05-10",
FieldNames = c("AdNetworkType",
"Impressions",
"Clicks",
"Cost"),
IncludeVAT = "YES",
IncludeDiscount = "NO",
Login = "client_login",
AgencyAccount = "aguncy_login",
TokenPath = tempdir())
}
Run the code above in your browser using DataLab