Efficient anti-sampling with the Google Analytics Reporting API

Avoiding sampling is one of the most common reasons people start using the Google Analytics API. This blog lays out some pseudo-code to do so in an efficient manner, avoiding too many unnecessary API calls. The approach is used in the v4 calls for the R package googleAnalyticsR. Avoiding the daily walk The most common approach to mitigate sampling is to break down the API calls into one call per day.

Read more

Share Comments

SEO keyword research using searchConsoleR and googleAnalyticsR

In this blog we look at a method to estimate where to prioritise your SEO resources, estimating which keywords will give the greatest increase in revenue if you could improve their Google rank. Overview Thanks to Vincent at data-seo.com who proof read and corrected some errors in the first draft Data comes from Google Search Console and Google Analytics. Search Console is used to provide the keywords in these days post (not provided).

Read more

Share Comments

Scheduling R scripts for a team using RStudio Server, Docker, Github and Google Compute Engine

edit 20th November, 2016 - now everything in this post is abstracted away and available in the googleComputeEngineR package - I would say its a lot easier to use that. Here is a post on getting started with it. http://code.markedmondson.me/launch-rstudio-server-google-cloud-in-two-lines-r/ This blog will give you steps that allows you to run on Google Compute Engine a server that has these features: RStudio Server instance with multiple login. Apache to host a welcome webpage.

Read more

Share Comments

googleAuthR 0.2.0

googleAuthR is now on CRAN version 0.2.0. This release is the result of using the library myself to create three working Google API libraries, and tweaking the googleAuthR code to better support the process. As a result all of these libraries are now able to be authorised with one Google OAuth2 login flow: googleAnalyticsR searchConsoleR bigQueryR Batching This means the libraries above and any other created with googleAuthR can take advatage of batching: this uses a Google API feature that means you can send multiple API calls at once.

Read more

Share Comments

Jekyll + Github + Markdown = Blog

Hello World! Welcome to my new home for code blogging. I’ll keep the regular blog for all the other stuff, running on Posthaven. Why? Its educational, and free, and writing code posts using Posthaven’s rich text editor was sometimes painful. Using this setup means its all written in Markdown so I get control over everything just the way I want it, and since it combines Github and Markdown, two things I know well already, Jekyll seemed worth knowing.

Read more

Share Comments