Page 1 of 1

How to connect (Google Ads, Facebook, Bing, Google Analytics, DoubleClick, …) to Google Sheets

Posted: Mon May 18, 2020 8:37 am
by niklaskolster
portThe platform supports API calls to retrieve and send information. In this article, we explain how to extract data and visualise it in Google Sheets.

The prerequisites are:
  • account
  • API key
  • Access to Google Sheets
  1. Open the sample Google Sheets file here and fill in the green highlighted. Username here is not your email but the client_name, the company name you registered with.
  2. After entering the correct information the cells below Dates and the cells below Costs should be loaded from the selected database table.
  3. Analyse the query in cell B8 and customise it to your liking
  4. Change the contents of the cell B12 to load other metrics. More information on the available metrics can be found here
More details:
  1. Here is an example of an API call:

    Code: Select all,source,medium,campaign,sum:markov,sum:totalcost&_groupby=date,source,medium,campaign&_order=-date
    Replace the APIKEY.
    This would get all costs and attributed revenues and sum them by date and source medium and campaign.
    Finally it would sort it by date
  2. This is then put into a cell with the value:

    Code: Select all

    =IMPORTXML(APICALL, “//date”)
The API functions are documented here: