Using R to Analyze Google Analytics Data

Website operators and digital marketing analysts frequently use Google Analytics and Piwik to monitor and analyze site traffic, but neither of these tools allow the user to add data from external sources. This course will show you how to combine Google Analytics with data from external sources including content management systems, Google Trends, Google Search Console and other sources to better understand what makes for successful pages and successful user experiences.

The class will cover the following:

  • Installing and getting started with R
  • Google Analytics, Google Trends and Google Search Console Terms and Conditions with respect to data use
  • Retrieving and loading Google Analytics data with R
  • Retrieving and loading Wordpress and Joomla content data with R
  • Retrieving Google Trends and Google Search Console data with R
  • Combining web analytics data
  • Using R to prepare both static and interactive graphics of web analytics data
  • Using R to prepare correlations and predictive models of web analytics behavior
  • Setting up batch jobs to maintain historical data


The course assumes previous use of a programming language such as Visual Basic, Excel Macro language, C/C++, Java, Perl, Python, SAS or PHP, though the course does not assume that the student is an active programmer. Knowledge of statistical concepts (mean, median, standard deviation) is helpful but not required.