## Not run:
#
#
# ## client info taken from Google API console.
# CLIENT_ID <- "xxxxx.apps.googleusercontent.com"
# CLIENT_SECRET <- "xxxxxxxxxxxx"
# CLIENT_URL <- 'https://mark.shinyapps.io/ga-effect/'
# ## comment out for deployment, in for local testing via runApp(port=6423)
# CLIENT_URL <- 'http://127.0.0.1:6423'
#
# securityCode <- createCode()
#
# shinyServer(function(input, output, session)){
#
# ## returns list of token and profile.table
# auth <- doAuthMacro(input, output, session,
# securityCode,
# client.id = CLIENT_ID,
# client.secret = CLIENT_SECRET,
# client.uri = CLIENT_URL)
#
# ga.token <- auth$token
# profile.table <- auth$table
#
# segments <- doSegmentMacro(input, output, session,
# token=ga.token())
#
# }
# ## End(Not run)
Run the code above in your browser using DataLab