The e-book
“Using Google Analytics with R” (Michal Brys) is a practical guide to analyzing data from Google Analytics in R. Written by a data scientist in 2014, but does not lose its relevance today.
We are currently swimming in a “data lake” (data lake). Only if you know how to use this data will you stay on the surface. The first step is to regularly check the standard reports in the web analytics tool (Google Analytics).
But to stay competitive you need something more. Everyone is talking about data collection. But only a few know what to do with the data after it is collected. I will try to describe this process and give you some ideas on how to work with data from Google Analytics using R.
R is a programming language for statistical data processing and working with graphics, as well as a free open-source computing environment within the GNU project. It was developed by
Ross Ihaka and
Robert Gentleman of the Faculty of Statistics of the University of
Auckland (Ross Ihaka) and
Robert Gentleman .
')
The main advantages of the language R:
- free;
- many libraries are available for various statistical calculations;
- current package list. A variety of study materials (study guides, MOOCs, blogs) are available for free on the Internet;
- has a large community of specialists (Russian is still small);
- ready to run on different platforms (Windows, Mac, Unix). A server installation version is also available;
- fast because it works in memory mode.
The author of the material has been working in the Internet industry since 2009, is an expert in web analytics in e-commerce, especially using Google Analytics and Google Tag Manager, and is also a member of the Google development team in Krakow, Poland.
Thanks to this book, I met R. It is written for marketers who have worked with Google Analytics and know the basic metrics included in this tool and know the web interface.
The book uses
R Studio (a free open source software development environment for the R programming language), as well as various packages, such as:
googleAnalyticsR, googleAuthR, RGoogleAnalytics, ggplot2, plotly, tidyverse, forecast, reshape2 .
Book's contents:- Introduction
- What for?
- About Google Analytics
- Pro R
- about the author
- Environment preparation
- Data sources
- Creating an Analytics Account
- Retrieving credentials for the Google Analytics API
- Installing a Google Analytics counter on a website
- Installing R Studio
- The first steps
- Introduction to R
- Link to Google Analytics
- Package googleAnalyticsR
- Import and export data in .CSV
- Code storage
- Exploratory Data Analysis (EDA)
- Data Visualization in R
- Traffic Heat Map
- Device comparison
- Machine learning
- Clustering (k-medium method)
- Building reports
- Introduction to R Markdown
- Report creation
- Additional analysis
- Anomaly detection
- Forecasting
- Resources (blogs, documentation, online trainings, books)
Download the book in .pdf formatSince the book was written in 2014, some things have changed over the past 5 years. For example, the Google Analytics code has been updated (gtag.js), the interface has been changed to cloud.google.com, some commands in the R libraries. During the translation, I checked the code myself, ran the programs, and made adjustments where necessary. Therefore, the data from the original book may differ slightly from my translation.
If you find errors and there are comments on the transfer, please write me a mail
ya.osipenkov@icloud.com . Thanks, too, can be =)