Description Usage Arguments Value Examples
Customize the output or add a new target file (beyond CSV, log or Database). To do that, override the 'event()' function after assigning it to a variable.
1 | shiny_events(app = basename(getwd()))
|
app |
The name of the app. Defaults to the name of the script's containing folder. |
An environment variable containing: a GUID, the name of the app, entry() function and event() function.
1 2 3 4 5 6 7 8 9 10 11 12 13 | file_name <- tempfile(fileext = "txt")
tracker <- shiny_events("example-app")
tracker$event <- function(activity = "", value = "") {
entry <- tracker$entry(activity = activity, value = value)
cat(
paste(
entry$guid, entry$datetime, entry$app, entry$activity, entry$value, "\n", sep = "|"
),
file = file_name, append = TRUE
)
}
tracker$event("slider", "10")
readLines(file_name)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.