if (FALSE) {
# Use googleAnalyticsR for upload data into Google Analytics
library(googleAnalyticsR)
# load cost data
cost_data <- fbGetCostData(accounts_id = "act_11111",
date_start = "2020-05-10",
date_stop = "2020-05-14",
username = "fb_login")
# upload into GA source
ga_custom_upload_file(accountId = xxxx,
webPropertyId = "UA-xxxx-1",
customDataSourceId = 'abcdefg',
cost_data)
}
Run the code above in your browser using DataLab