Wyoming Finance

Jun 25 2017

Query Your Google Analytics Data from R #predictive #analytics #with #r


#

RGoogleAnalytics

RGoogleAnalytics is a R package that provides an interface to the Google Analytics API. It enables you to query and extract your Google Analytics data within R itself.

It aims to provide the much need data extraction functionality since Google Analytics does not have a native R Client. It is designed for analysts and data scientists who wish to apply R’s analytics capabilities to their Google Analytics data.

Here are a few things RGoogleAnalytics does well out of the box

  • Provides Access to v3 of the Google Analytics Core Reporting API
  • Ability to pull more than 10,000 rows of data in batches via Pagination of queries
  • Ability to mitigate the effect of Query Sampling by splitting the date-range of queries and hence extract (nearly) unsampled data
  • In cases where queries are sampled, the output also returns the percentage of sessions that were used for the query
  • Supports authorization via OAuth 2.0

At its core, RGoogleAnalytics handles the low level API routines (Authorization, JSON Data Parsing). Moreover, its bells and whistles ensure that you can extract your data without you having to worry about the plumbing. It is therefore well suited for both ad-hoc and batch extraction jobs. But if your use-case requires batch data extraction it is advisable to build your own data extraction module that satisfies your application’s latency requirements.

To get the current released version from CRAN:

To get the current development version from github:

If you are using the RStudio IDE then you can simply select RGoogleAnalytics from the dropdown in the Install Packages option

Below are a few blog posts that go over various web analytics use-cases in R. The posts assume general familiarity with R. If you haven’t used R much or at all, do invest some time in learning about R first.

This post gives a quick walkthrough of RGoogleAnalytics and getting your Google Analytics Data into R

Forecasting the number of visitors on your website using R. Part I

This blog post is the first in the series of three blogs. The current blog will introduce the reader to the importance of forecasting. Read more

Forecasting the number of visitors on your website using R. Part II

This blog is the second post of a series of three blogs. In the Previous Blog I had introduce the reader to the impo. Read more

How Predictive Analytics Can Help You Strengthen Your Re-marketing Strategies

Who should attend

Digital Marketers, Web Analysts, Business Analysts, Anyone who knows Google Analytics and is curious to explore more


Written by admin


Leave a Reply

Your email address will not be published. Required fields are marked *