Google Ads

Google Ads Source Plugin Configuration Reference


This example syncs from Google Ads to a Postgres destination. The (top level) source spec section is described in the Source Spec Reference.

kind: source
# Common source-plugin configuration
  name: googleads
  path: cloudquery/googleads
  version: "v2.0.0"
  tables: ["*"]
  destinations: ["postgresql"]

  # Google Ads specific configuration
    developer_token: "<GOOGLEADS_DEVELOPER_TOKEN>"
    login_customer_id: "<GOOGLEADS_MANAGEMENT_ACCOUNT_ID>"
      access_token: "<YOUR_OAUTH_ACCESS_TOKEN>"

Google Ads Spec

This is the (nested) spec used by the Google Ads source plugin:

  • developer_token (string, required):

    A Google Ads Developer Token (opens in a new tab).

  • login_customer_id (string, optional. Default: ""):

    Google Ads Login customer ID (opens in a new tab).

    Format: digits either with or without hyphen (-).

    This parameter allows to specify the root account to fetch data from (as well as linked accounts). If omitted, the accessible accounts are listed (opens in a new tab) and are used instead.

    Note: As Google Ads API (opens in a new tab) doesn't allow obtaining the current account ID, you can set this parameter to the account ID you generated Developer Token (opens in a new tab) from. This way you'll be able to fetch the data from the root management account as well.

  • customers ([]string, optional. Default: empty)

    Fetch the data only from the specified accounts. If account ID specified is a management account, the data will be fetched both from this account and all accounts accessible from it.

    Format: digits either with or without hyphen (-).

  • oauth (OAuth spec, optional. Default: empty)

Google Ads OAuth spec

Google Ads API (opens in a new tab) requires OAuth authorization for scope to execute API calls.

  • access_token (string, optional. Default: "")

    An access token that you generated authorizing for scope (e.g., by using OAuth 2.0 Playground (opens in a new tab)).

  • client_id (string, optional. Default: "")

    OAuth 2.0 Client ID.

  • client_secret (string, optional. Default: "")

    OAuth 2.0 Client secret.