As I recently shared in a previous post, Daily Reports are an amazing tool to benchmark company key performance indicators (KPIs) and funnels. Depending on your company KPI’s, and supporting funnels, you may or may not need/ want to pull multiple data sources to generate a Daily Report.
Under the hood FashioningChange is a recommendation engine so we looked at a ton of data that we pulled from a number of locations like KissMetrics, Google Analytics, CrazyEgg, and Inspectlet (to name a few). As a result the mechanisms for pulling the data varied widely. In order to ensure we established a flexible foundation that would provide a common structure for later analysis, reports, and emails, we created a common structure for pulling and storing a ‘daily’ number. Then whenever a data source was added we simply added a custom adapter that would know how to pull data for a particular day from that source.
For example, data pulled from the main FashioningChange database uses SQL or the Ruby ActiveRecord interface to pull it out, while data pulled from Google Analytics uses the Google Analytics API. Regardless of the mechanism, the data is then stored as a set of daily values in the FashioningChange database where it is easy to access it. These daily values store the name of the metric, the day, and the value.
Making Data Available to the Team
Once data is processed and stored as daily metrics, it is super easy to pull it out and put it into any format we want. We just pull out all of the metrics for a particular day, and generate an email that contains each one’s name and value. FashioningChange uses Rails so we generate the email via ActionMailer (built in Rails), but this can be done with any tool used to generate transactional emails.
Because we have everything in this concise daily format, it is then easy to do comparisons with prior weeks (i.e. compare ‘last Monday to this Monday’). For example, to do a comparison with 1 week prior, simply pull out all of the metrics for the same day a week ago, and in the email for each metric show both the most recent value but also the comparison value. This is shown in pink below:
Given our simple daily metric format, generating a weekly report requires just one straightforward addition. As discussed above, metrics already know how to pull data for a particular day, they now just need to define for each metric how to aggregate over a longer time period. Many metrics like new users can be simply summed over the time period, while others like conversion rates should be averaged, and still others like total users should simply take the most recent value.
Once the foundation is built to pull data from multiple sources it’s pretty easy to replicate and add to the Daily Report. It’s important to remember that just because you can pull data doesn’t mean you should. The trick is to pull the right points of data that will help you make more informed business decisions.