RGoogleAnalytics: Creates a skeleton shell for accessing the Google Analytics...

Description Value Examples

Description

Creates a skeleton shell for accessing the Google Analytics API.

Value

Returns a list of methods, for accessing the Google Analytics API. GetXmlDataFeed(), GetRDataFromXML(), SetCredentials(), GetProfileXML(), GetProfileData(), GetReportData(), For more information please look at the help pages for each function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ga <- RGoogleAnalytics()
ga$SetCredentials("INSERT_USER_NAME", "INSERT_PASSWORD")
# Get the list of different profiles, to help build the query.
prof <- ga$GetProfileList()
# Build the query.
query.builder <- QueryBuilder()
query.builder$Init(start.date = "2010-05-01",
end.date = "2010-08-20",
dimensions = "ga:date",
metrics = "ga:visits",
sort = "ga:date",
table.id = "ga:30661272")
ga.data <- ga$GetRDataFromQuery(query.builder)
# Look at the data returned.
head(ga.data$data)

noahhl/r-google-analytics documentation built on May 23, 2019, 9:29 p.m.