View source: R/google-analytics.R
get_ga_properties | R Documentation |
This retrieves all the property ids associated with a Google Analytics Account. 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_properties(account_id, token = NULL)
account_id |
the account id of the properties you are trying to retrieve |
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])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.