Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ga_account_list

Account summary for all accounts available to your user


Description

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.

Usage

ga_account_list(type = c("universal", "ga4", "data"))

Arguments

type

Whether to get account summary from universal analytics of GA4 (App_Web) properties

Details

Get a summary of all your accounts, web properties and views your authenticated user can see.

Value

a dataframe of all account, webproperty and view data

See Also

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()

Examples

## Not run: 

library(googleAnalyticsR)
ga_auth()
al <- ga_account_list()
al$viewId

## get account summary of GA4 properties
ga_account_list("ga4")

## End(Not run)

googleAnalyticsR

Google Analytics API into R

v1.0.0
MIT + file LICENSE
Authors
Mark Edmondson [aut, cre] (<https://orcid.org/0000-0002-8434-3881>), Artem Klevtsov [ctb], Johann deBoer [ctb], David Watkins [ctb], Olivia Brode-Roger [ctb], Jas Sohi [ctb], Zoran Selinger [ctb], Octavian Corlade [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.