Learn R Programming

shinyga (version 0.1.2.9001)

processManagementData: Take GA API output and parses it into data.frame

Description

Internal function for returning a dataframe from API response

Usage

processManagementData(url, keep)

Arguments

url
The GA API response URL.
keep
Which colums to keep.

Value

A dataframe of GA data.

See Also

Other fetch data functions: MEgetData; getAndMergeGAAccounts; rollupGA; shinygaGetAccounts; shinygaGetAdWords; shinygaGetCustomDataSources; shinygaGetCustomDimensions; shinygaGetCustomMetrics; shinygaGetFilters; shinygaGetGoals; shinygaGetProfiles; shinygaGetSegments; shinygaGetUsers; shinygaGetWebProperties

Examples

Run this code
## Not run: 
# shinygaGetSegments = function(token, start=1, max=1000) {
# url <- paste('https://www.googleapis.com/analytics/v3/management/segments',
#              '?access_token=', token,
#              '&start-index=', start,
#              '&max-results=', max,
#              sep='', collapse='')
# 
#              return(processManagementData(url,
#                     c('id', 'segmentId', 'name', 'definition', 'created', 'updated')))
#                     }
# ## End(Not run)

Run the code above in your browser using DataLab