Adding a Sexy UI to RSiteCatalyst using Shiny

Before we begin, it is important to mention that we have long been strong supporters of the work that Randy Zwitch, Willem Paling & Jowanza Joseph have done to create and maintain the extremely powerful Adobe Analytics R Package, RSiteCatalyst. Their dedication to this open-source effort often goes unrecognized which, as the idea of using programmatic analysis for digital analytics data becomes a more accepted practice, we hope will change.

While we, and countless others, have found the ability to programmatically prepare, manipulate, and analyze Adobe Analytics data using the RSiteCatalyst package insanely valuable, we also found that there was much greater value to be had if only we could expose the power of programmatic data analysis to a broader audience.

The question then became, how can we bring the power of R to decision makers that aren’t being paid to program in R? The answer, a sexy UI of course!

To help illustrate how you can leverage the Shiny UI framework in combination with the RSiteCatalyst package, we have developed a very basic application to walk you through the steps. So while you may find yourself saying ‘I can do all of this much easier inside Adobe Analytics or Excel’ remember that this example is meant to serve as a starting point for building more complex applications that provide functionality that would be very difficult, if not impossible, to accomplish using those other applications.

NOTE: This example assumes that you have the following installed and configured:

  • R
  • RStudio
  • RSiteCatalyst Package
  • Shiny Package

Shiny applications have two primary components, a user-interface file (ui.R) that defines the look & feel of the application and a server script (server.R) that contains all of the R code the application will leverage.


# Load Shiny

# Define UI for the application
  # Application title
  titlePanel("Adobe Analytics - Report Suite Summary"),
  # Sidebar with controls to provide Adobe Analytics API credentials,
  # report suite, and reporting date pickers.
      textInput("user", "user:company", ""),
      textInput("secret", "shared secret", ""),
      textInput("rsid", "report suite", ""),
      label = 'from: yyyy-mm-dd',
      value = Sys.Date()
      label = 'to: yyyy-mm-dd',
      value = Sys.Date()

      actionButton("getRS", "Get Report Suite Summary")
    # Show the summary output from RSiteCatalyst

The server-side of the application is shown below and handles the Adobe Analytics API authentication, the report request, and the output sent to the UI.


# Load Shiny

# Define server logic required to request summary data from Adobe Analytics
shinyServer(function(input, output) {

  # Load RSiteCatalyst

    # Listen for a click on the 'Get Report Suite Summary' button
    observeEvent(input$getRS, {
          # Authenticate using the user supplied credentials
	  SCAuth(input$user, input$secret)
          # Builds report reqeust using user inputted parameters

Once you have your ui.R and server.R scripts coded, place them in directory that can be called from RStudio to test your application.

Within RStudio, execute the following:


This will launch your application.

Shiny UI

While the application is running, you can make use of the RStudio Console to monitor the application state.

RStudio Console

If everything worked correctly, the application will output the summary data.

Shiny Data Table
Our hope is that someone will take this basic framework and will be inspired to build a killer application utilizing Shiny and RSiteCatalyst.
RSiteCatalyst Technical Reference
Shiny Function Reference
Shiny Sample Applications