-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverview_report.r
52 lines (45 loc) · 1.57 KB
/
overview_report.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# To install RAdwords, you must install via github
# library(devtools)
# install_github('jburkhardt/RAdwords')
# Can look up metrics info with:
# metrics("KEYWORDS_PERFORMANCE_REPORT")
#install.packages("devtools")
library(devtools)
install("SalvatoUtilities")
install("AdWordsUtilities")
install("MixpanelUtilities")
install("PowerSupplyUtilities")
install("BingUtilities")
SalvatoUtilities::detach_all_packages()
library(utils)
library(graphics)
library(RPostgreSQL)
library(RJDBC)
library(plyr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(lubridate)
library(Rmisc)
library(RMixpanel)
library(RAdwords)
library(readr)
library(SalvatoUtilities)
library(AdWordsUtilities)
library(MixpanelUtilities)
library(PowerSupplyUtilities)
library(BingUtilities)
# Set reporting parameters
from = start_date = '2015-12-17 04:00:00'
#end_date = paste(toString(Sys.Date() - days(0)), "03:59:59") #yesterday
# start_date = paste(toString(Sys.Date() - days(8)), "04:00:00")
to = end_date = paste(toString(Sys.Date() - days(0)), "03:59:59")
#start_date = '2016-04-28, 04:00:00'
#end_date = '2016-04-28, 03:59:59'
bing_keywords_elog <- create_bing_event_log(from=start_date, to=end_date)
adwords_keywords_elog <- create_adwords_event_log(from=start_date, to=end_date)
gdn_elog <- create_google_display_event_log(from, to)
###################################### CREATE AdWords Plots and CSVs ##############################################
PowerSupplyUtilities::search_engine_marketing_report( adwords_keywords_elog,
bing_keywords_elog,
gdn_elog)