This is the recommended way to get all your account details for your user, including the web property and View IDs. The $viewId
column contains the ID you need for the data fetching functions such as google_analytics.
google_analytics_account_list()ga_account_list()
a dataframe of all account, webproperty and view data
Get a summary of all your accounts, web properties and views your authenticated user can see.
https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/accountSummaries/list
Other account structure functions: ga_accounts
,
ga_view_list
, ga_view
,
ga_webproperty_list
,
ga_webproperty
# NOT RUN {
# }
# NOT RUN {
library(googleAnalyticsR)
ga_auth()
al <- ga_account_list()
al$viewId
# }
Run the code above in your browser using DataLab