We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ga_model() to pre-load common tasks such as trends of metrics, etc.
ga_model()
The text was updated successfully, but these errors were encountered:
GA4 date trends
# ga_model: GA4 metric time-series trended into an interactive dygraph plot library(xts) library(dygraphs) # fetch data data_f <- function(view_id, date_range = c("400daysAgo","yesterday"), metrics = c("sessions"), ...) { ga_data(view_id, metrics = metrics, date_range = date_range, dimensions = "date", limit = -1, orderBys = ga_data_order(+date)) } # model data model_f <- function(df, ...) { xts::xts(df[, -1], order.by = df$date) } # output data output_f<- function(df,...) { require(dygraphs) dygraph(df, main = "GA4 trend- googleAnalyticsR") %>% dyAxis("x", label = "Date") %>% dyOptions(axisLineWidth = 1.5, drawGrid = FALSE) } model <- ga_model_make(data_f = data_f, required_columns = c("date"), model_f = model_f, output_f = output_f, required_packages = c("xts","dygraphs"), description = "GA4 Metric Trend", outputShiny = dygraphs::dygraphOutput, renderShiny = dygraphs::renderDygraph) ga_model(1234567, ga4_trend) ga_model(1234567, ga4_trend, date_range = c("100daysAgo","yesterday")) ga_model_save(ga4_trend, "inst/models/ga4-trend.gamr")
Available via
ga_model(1234567, ga_model_example("ga4-trend.gamr"))
Sorry, something went wrong.
Add ga4-trend model #354
40511ed
fix #356 and updates for #354 #358
8cce1fc
MarkEdmondson1234
No branches or pull requests
Use
ga_model()
to pre-load common tasks such as trends of metrics, etc.The text was updated successfully, but these errors were encountered: