Home About Blog pRojects

Improve your shiny dashboard with Disqus panel

Getting users feedback is always a pleasant moment. In most cases in World of Open Source we are creating tools and applications for people and we love to hear that someone thinks our (generally pet) project is useful. Mostly this moment is nicer than any paycheck. Check this post to find out how to provide easy interface for collecting the user feedback!

But how author can enable easy contact with him as the author of the project or application? I’ve seen home websites having special contact panel where authors provide e-mail address or links to specially prepared forums. I found that providing e-mail address isn’t the best solution as people keep asking the same questions, not knowing they were asked and, what is even WORSE, not knowing they were already answered.

Sometimes it’s good to use Issue panel at the GitHub repository of the project but this works mostly for packages development and gathering users requests about improving bugs. What if I have prepared shiny dashboard and I would not like to have application under one URL and discussion panel under other (Issues at GitHub repository, forum or Google group)? I would like to have an application and panel in one place, preferably within the application. This is possible!

I have found a great and easy to implement solution to this challenge. It consists of a few clicks and one copy and paste operation. So it’s a standard in the present reality of StackOverflow.

It’s a Disqus panel! It is widely used by RStudio in their homepage of rmarkdown package. You can see it at the bottom of each sub site (and even on my blog sub websites).

To start you just click Add Disqus to your site and follow the creation instructions. If you’d better follow print-screen tutorial check the gallery that is below (visible under Mozilla Firefox).

Finally you can click on the Universal Code option to gain a code that you should include to your website if you would like to add Disqus panel. This might encourage users to provide user requests and to share their ideas without much effort.

This disqus code can be added as a plain HTML text to shinydashboard as in the following example (you can also copy code from this gist)

ui <- dashboardPage(
     tabName = "disqus_here",
     icon = icon("info")
        tabItem(tabName = "disqus_here",
    (function() {  
        var d = document, s = d.createElement('script');
        s.src = '//CHANEL_NAME.disqus.com/embed.js';
        s.setAttribute('data-timestamp', +new Date());
        (d.head || d.body).appendChild(s);
<noscript>Please enable JavaScript to view the
<a href='https://disqus.com/?ref_noscript' rel='nofollow'>comments powered by Disqus.</a>
    div(HTML('<script id="dsq-count-scr" src="//CHANEL_NAME.disqus.com/count.js" async></script>'))

server <- function(input, output, session) {

shinyApp(ui, server)

Now you can improve your shinydashboard with disqus panel as we have done to provide easier feedback collecting at our shinydashboard in MI2 group where we present available rooms to rent in the desired localization with user constraints as price, room size and time to work.

If you think I can improve my blog or this post please use Disqus at the end of this page :)!