Setting your own credentials in googleAnalyticsR

If you’re using Mark Edmonson’s fantastic googleAnalyticsR package, you may be relying on package defaults to pull data via the GA API. With so many users now using this package, API limits are quickly being hit, because it uses a single set of oAuth Credentials for a default Google Project which Mark has provided. This means that you and other users in the R community may not be able to make calls via the API when daily limits are hit.

The good news is, there’s an easy way around this – you just need to create a project in Google Cloud console and generate an oAuth client ID and client secret. These credentials can be set in your googleAnalyticsR configuration and provide you with your very own quota of API calls.

If you’re like me, you might hesitate on doing this, unsure how easy it will be. The answer is very easy, as long as you know the steps.

Here’s a video showing how you can create a project + credentials, then pass these on to googleAnalyticsR for authentication.

To find out more, check out the package documentation. It’s also well worth taking a browse of Mark Edmondson’s full package list, and checking out the cloudyr project.



Read More