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

ga_model

Use a model


Description

Use a model created by ga_model_make

Usage

ga_model(viewId, model, load_libs = TRUE, ...)

Arguments

viewId

The GA viewId to operate on

model

A file location of a model object or a model object created by ga_model_make

load_libs

Whether to load the library requirements into your namespace

...

Other arguments to pass into the model as needed

See Also

Examples

# models that come with the package
ga_model_example()
## Not run: 

# your own Google Analytics viewID
my_viewid <- 81416156

# load the model (equivalent to ga_model_load())
decomp_ga <- ga_model_example("decomp_ga.gamr")

# apply model to your data
d1 <- ga_model(my_viewid, model = decomp_ga)

# change default date range to 20 days ago to yesterday
d2 <- ga_model(my_viewid, model = decomp_ga, 
               date_range = c("20daysAgo","yesterday"))



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