rgoogleads-package: Loading Data From 'Google Ads API'

rgoogleads-packageR Documentation

Loading Data From 'Google Ads API'


logo Interface for loading data from 'Google Ads API', see https://developers.google.com/google-ads/api/docs/start. Package provide function for authorization and loading reports.

Capabilities of rgoogleads:

  • Authorization in the Google Ads API

  • Loading a list of top-level accounts

  • Loading the entire hierarchy of accounts from manager accounts

  • Loading list of Google Ads client account objects: campaigns, ad groups, ads, etc.

  • Loading statistics from Google Ads client account

  • Loading resource metadata, resource fields, segments and metrics

  • Loading forecast and historical metrics from Keyword Planning.


Alexey Seleznev

See Also


## Not run: 

# set own oauth app
gads_auth_configure(path = 'C:/auth/app.json')
# set your developer token if needed, or use default developer token
gads_auth(email = 'me@gmail.com', developer_token = "own developer token")

# get list of accessible accounts
my_accounts <- gads_get_accessible_customers()

# set manager account id

# set client account id

# load report data
ad_group_report <- gads_get_report(
  resource    = "ad_group",
  fields = c("ad_group.campaign",
  date_from   = "2021-06-10",
  date_to     = "2021-06-17",
  where       = "ad_group.status = 'ENABLED'",
  order_by    = c("metrics.clicks DESC", "metrics.cost_micros")

## End(Not run)

rgoogleads documentation built on April 19, 2022, 5:09 p.m.