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

ga_meta

Get current dimensions and metrics available in GA API.


Description

Get current dimensions and metrics available in GA API.

Usage

ga_meta(
  version = c("universal", "data"),
  propertyId = NULL,
  cached = TRUE,
  no_api = FALSE
)

Arguments

version

The Google Analytics API metadata to fetch - "universal" for Universal and earlier versions, "data" for Google Analytics 4

propertyId

If requesting from Google Analytics 4, pass the propertyId to get metadata specific to that property. Leaving it NULL or 0 will return universal metadata

cached

Whether to use a cached version or to use the API to fetch the results again

no_api

Don't call the API, just return googleAnalyticsR::meta4

Value

dataframe of dimensions and metrics available to use

See Also

Examples

## Not run: 

# universal analytics
ga_meta()

# Google Analytics 4 metadata from the Data API
ga_meta("data")

# Google Analytics 4 metadata for a particular Web Property
ga_meta("data", propertyId = 206670707)


## 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.