#* @get /counter
function(req){
count <- 0
if (!is.null(req$session$counter)){
count <- as.numeric(req$session$counter)
}
req$session$counter <- count + 1
return(paste0("This is visit #", count))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.