setup_psql_event_store | R Documentation |
learnr
User-Events in PostgreSQLUser-events are saved in a PostgreSQL table in the following format:
setup_psql_event_store( what = c("question_submission", "exercise_submission", "exercise_error"), db_table = "events", db_user = NULL, db_pass = NULL, db_name = NULL, db_host = NULL, db_port = NULL, ignore_errors = FALSE )
what |
What user-events are to be stored? See https://rstudio.github.io/learnr/publishing.html#recording_events for available event names. |
db_table |
Name of the events table. |
db_user, db_pass |
User name and password. If |
db_name |
Database name. If |
db_host, db_port |
Hostname and port. If |
ignore_errors |
if |
primary key, generated by the database (defined as SERIAL PRIMARY KEY)
timestamp when the event was emitted (defined as TIMESTAMP DEFAULT CURRENT_TIMESTAMP)
string identifying the tutorial (defined as CHARACTER VARYING(255))
string identifying the version of the tutorial (defined as CHARACTER VARYING(255))
string identifying user (defined as CHARACTER VARYING(255))
string identifying the event (defined as CHARACTER VARYING(255))
event data, stored as JSON (defined as JSONB)
The user id is determined from the current session. See resume_session for details on how the user id is determined in the first place.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.