Google Ads

The Google Ads extractor pulls raw data from Google's AdWords API and extracts the following resources from a Google Ads account:

For more information you can check the documentation for tap-adwords.

In order to access your Google Ads data, you will need the following:

  • The Account IDs to replicate data from
  • Your Developer Token for Google AdWords
  • The Client ID and Secret for a valid Google OAuth Client
  • A Refresh Token generated through the OAuth flow by using your OAuth Client and your Developer Token.

Account IDs

A comma-separated list of AdWords account IDs to replicate data from.

For example: 1234567890, 1234567891, 1234567892

Start Date

This property allows you to configure where you want your extracted data set to start from.

Configuration Notes

  • Determines how much historical data will be extracted.
  • Please be aware that the larger the time period and amount of data, the longer the initial extraction can be expected to take.

End Date

This property allows you to configure where you want your extracted data set to end. Otherwise, if left blank, it will try to fetch all the Ads data from the Start Date until the date you run the Extractor.

OAuth Refresh Token

Get it now!

You can also use the Meltano OAuth Service to acquire this token.

The Refresh Token generated through the OAuth flow run using your OAuth Client and your Developer Token.

You have to give access to your Ads Account (your google Account that manages your Google Ads).

You can check Google's documentation on how to generate a Refresh Token

User Agent for your OAuth Client

The User Agent for your OAuth Client (used in requests made to the AdWords API).

For example: Meltano

Meltano Setup

Self-Hosted

Please note that this extractor requires advanced configuration for self-hosted Meltano instances.

If you do not have (1) a developer token for your Google Ads Account and (2) an approved Google OAuth Client, the process that you have to go through to generate those may take between one and four weeks.

Prerequisites

Configure the OAuth Client

In order for the extractor to properly authenticate on Google APIs, it requires to be able to acquire new access tokens. The following variables are required for the authentication flow:

Configuration

  1. Open your project's .env file in a text editor
  2. Add the following variables to your file:
export OAUTH_GOOGLE_ADWORDS_DEVELOPER_TOKEN=<developer_token>
export OAUTH_GOOGLE_ADWORDS_CLIENT_ID=<client_id>
export OAUTH_GOOGLE_ADWORDS_CLIENT_SECRET=<client_secret>

Configuration with the Meltano UI

Open your Meltano instance and click "Pipelines" in the top navigation bar. You should now see the Extractors page, which contains various options for connecting your data sources.

Screenshot of Meltano UI with all extractors not installed and Google Ads Extractor highlighted

Let's install the Google Ads Extractor by clicking on the Install button inside its card.

On the configuration modal we want to enter all the fields descibed in the Google Ads Setup section.

Screenshot of the Google Ads Extractor Configuration

Advanced: Command Line Installation

  1. Navigate to your Meltano project in the terminal
  2. Run the following command:
meltano add extractor tap-adwords

If you are successful, you should see Added and installed extractors 'tap-adwords' in your terminal.

Configuration

  1. Open your project's .env file in a text editor
  2. Add the following variables to your file:

Required:

export TAP_ADWORDS_REFRESH_TOKEN=""
export TAP_ADWORDS_USER_AGENT=""
export TAP_ADWORDS_CUSTOMER_IDS=""
export TAP_ADWORDS_START_DATE="2020-01-01T00:00:00Z"

Optional:

export TAP_ADWORDS_END_DATE="2020-02-17T00:00:00Z"
export TAP_ADWORDS_CONVERSION_WINDOW_DAYS=""

TAP_ADWORDS_CONVERSION_WINDOW_DAYS sets how many days before the start_date to fetch data for Performance Reports (default: 0)

Check the README for more details.

Last Updated: 2/20/2020, 9:52:37 PM