Some time ago Google released a new product called Google Data Studio — its purpose is to easily create great looking, interactive reports (mostly for business purposes) that use data from various sources. It got a warm welcome as it simplifies analysts’ lives a lot. The only thing they have to do is just open the GDS, select a data source, move elements around and 🎉 they’re done.

Example marketing report by Google

As I already mentioned a cool thing with GDS is that it works with various data sources — you can for example pick one of the sources from Google’s gallery.

At the moment there are already 90 sources in the gallery from which:

- 14 are Google’s own sources for integrating with their products like Analytics, AdWords or Sheets.

- 73 are 3rd party app sources like Twitter, Tumblr or Supermetrics

- 6 open source data sources for connecting with GitHub, NPM or StackOverflow

Google Data Studio Connector gallery

This idea really appealed to us in Leadfeeder, so we decided to start building a connector to integrate with our public API during one of our internal hackathons.

I started digging into Google’s documentation and I’ve found this guide. I definitely recommend this set of docs as a starting point, however as you’ll start getting more familiar with the technology you’ll start asking questions that aren’t really touched in Google’s tutorials, but are crucial when building high quality software. E.g.:

- How can I cache heavy API responses?

- Can I use external JS libraries in my connector’s code?

- How do I unit test my connector?

- How do I setup a CI system to automatically test and deploy my connector?

- Can I develop the code in my own dev environment instead of Google Scripts online editor?

Google’s documentation is constantly getting better, so there’s a chance that soon such things will be described there, but for now there’s a bunch of unclear things that I had to get to know myself. I’d like to save a lot of your time, so I decided to start this series of articles in which you’ll learn how to develop a connector from A-Z. By “develop” I mean not only mean “make it work”, but how to make a mature piece of software with good test coverage and CI setup.

The series consists of following parts:

1. Basic setup — how to create the connector and setup your development environment

2. OAuth, calling external APIs and caching

3. Setting up unit tests, linter and code coverage

4. Testing and deploying the connector with a CI platform