Create a Google Analytics variable selector

Shiny Module for use with GA4 metric and dimension fields fetched via ga_meta("ga4")

metricDimensionSelectUI(id, label = "Metric", multiple = TRUE, width = NULL)

metricDimensionSelect(
  id,
  field_type = c("metric", "dimension"),
  custom_meta = NULL,
  default = NULL
)

Arguments

id

The Shiny id

label

label

multiple

multiple select

width

width of select

field_type

metric or dimension

custom_meta

Pass a meta field table from ga_meta("ga4") to get custom fields from GA4 (reactive)

default

The default selected choice. First element if NULL

Value

Shiny UI the selected variable

See also

Examples