View source: R/shiny-modules-segments.R
segmentBuilder | R Documentation |
Shiny Module for use with segmentBuilderUI
segmentBuilder(input, output, session)
input |
shiny input |
output |
shiny output |
session |
shiny session |
Call via shiny::callModule(segmentBuilder, "your_id")
A segment definition
## Not run:
library(shiny)
library(googleAnalyticsR)
ui <- shinyUI(fluidPage(
segmentBuilderUI("test1")
))
server <- shinyServer(function(input, output, session) {
segment <- callModule(segmentBuilder, "test1")
.. use segment() in further gav4 calls.
})
# Run the application
shinyApp(ui = ui, server = server)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.