Last active
February 3, 2016 22:12
-
-
Save randyzwitch/7858752 to your computer and use it in GitHub Desktop.
Code to generate Adobe Analytics Implementation Documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("RSiteCatalyst") | |
library("WriteXLS") | |
#Validate that underlying Perl modules for WriteXLS are installed correctly | |
#Will return "Perl found. All required Perl modules were found" if installed correctly | |
testPerl() | |
#### 1. Pull data for all report suites to create one comprehensive report #### | |
#Authenticate with Adobe Analytics API | |
SCAuth("user:company", "sharedsecret") | |
#Get Report Suites | |
report_suites <- GetReportSuites() | |
#Get Available Elements | |
elements <- GetElements(report_suites$rsid) | |
#Get eVars | |
evars <- GetEvars(report_suites$rsid) | |
#Get Segments | |
segments <- GetSegments(report_suites$rsid) | |
#Get Success Events | |
events <- GetSuccessEvents(report_suites$rsid) | |
#Get Traffic Vars | |
props <- GetProps(report_suites$rsid) | |
#### 2. Generate a single Excel file | |
#Create list of report suite objects, written as strings | |
objlist <- c("report_suites", "elements", "evars", "segments", "events", "props") | |
#Write out Excel file with auto-width columns, a bolded header row and filters turned on | |
WriteXLS(objlist, "/Users/randyzwitch/Desktop/adobe_analytics_implementation_doc.xlsx", | |
AdjWidth = TRUE, BoldHeaderRow = TRUE, AutoFilter = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apologies if not the proper way to comment, but may want to abstract out your filename in the WriteXLS line so folks don't try to create the xls file in a directory that doesn't exist. Should be obvious, but not everyone has the same obvious filters...