dreamRs / shinylogs

Logs for Shiny apps
https://dreamrs.github.io/shinylogs/
96 stars 13 forks source link

How cound I get the user name(for example, cookie, etc.) with shinylogs package who used my shiny app? #10

Closed sugs01 closed 2 years ago

sugs01 commented 3 years ago

Dear Fanny and Victor, How cound I get the user name(for example, cookie, etc.) who used my shiny app?

library(shinylogs) path_directory <- list.files("/srv/shiny-server/easy-visualization/logs") chart_path = paste0("/srv/shiny-server/easy-visualization/logs/", path_directory) logs <- read_json_logs(path = chart_path)

table(logs$session$user) shiny sugs0 41 415 Kind Regards.

pvictor commented 3 years ago

Hello, What do you use to deploy your applications ? (Shiny server open source or pro, shinyproxy ...) You need an authentication mechanism to register user 's name, otherwise it will be default shiny user.

Victor

sugs01 commented 3 years ago

Dear Victor, I use Shiny server open souce to deploy my application on my own server. I want to open my application to everyone, so all users don't need to register or offer any money. However, I want to know how many users visit my application everyday and what happend with them. Could shinylogs package reliazed the function? Or some other tools, for example, Google Analytics? My application URL: http://www.easy-visualization.cn:3838/easy-visualization/ Have a nice weekend.

Gaosheng

pvictor commented 2 years ago

Hi Gaosheng,

Sorry for responding late. {shinylogs} doesn't record personnal data, theoretically you can't know the number of distinct visitors, but you can get an approximation by crossing the user-agent and the screen resolution. Otherwise yes Google Analytics is nice solution, with an automatic dashboard, but it's more complicated to track inputs. There's a nice tutorial here : https://shiny.rstudio.com/articles/google-analytics.html

Let me know if you have more questions.

Victor