read_session_cookie | R Documentation |
The user session contains the user's id and is stored in the client's browser as cookie. This function should not be called directly by itself, but rather through the setup function setup_user_session.
read_session_cookie( appid, domain = shiny::getDefaultReactiveDomain(), param_name = "userid", session_length = 0.125 )
appid |
Application id. All applications with the same ID share the same session. |
domain |
Shiny reactive domain. |
param_name |
URL query string parameter name to extract the user id from. |
session_length |
Duration for how long the session is to be active (in days). |
For the session logic to work, the shiny app needs to have shinyjs loaded and the session.js file included from
system.file('inst', 'js', 'session.js', package = 'stat305templates')
.
See the templates as provided by this package how this can be accomplished.
the user id as given in the query string or as saved in the user session.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.