View source: R/google-analytics.R
get_ga_property_info | R Documentation |
This is a function to get the Google Analytics accounts that this user has access to. The scope it uses is the ‘See and download your Google Analytics data' If you don’t this check this box on the OAuth screen this won't work.
get_ga_property_info(property_id, token = NULL)
property_id |
the property id you want information about. |
token |
credentials for access to Google using OAuth. 'authorize("google")' |
All the property ids and information about them for a Google Analytics account.
## Not run:
authorize("google")
accounts <- get_ga_user()
properties_list <- get_ga_properties(account_id = accounts$id[1])
property_id <- gsub("properties\\/", "", properties_list$name[1])
property_info <- get_ga_property_info(property_id = property_id)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.