- Notifications
You must be signed in to change notification settings - Fork2
R package for loading data from Google Ads API
License
Unknown, MIT licenses found
Licenses found
selesnow/rgoogleads
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Links
- Install
- Attach rgoogleads
- Main goal and capabilities of rgoogleads
- Privacy Policy
- Obtain Own Developer Token and create own OAuth client
- Example of use rgoogleads
- Package help
- Package chage log, news and updates
- Bug report and support
- Tutorials
- Author
This section contains links to the package documentation, as well as other useful links that may be useful to the package users.
- rgoogleads package documentation site
- CRAN page
- Google Ads API documentation
- Официальный плейлист с видео уроками по работе с rgoogleads
You can installrgoogleads fromCRAN orGitHub:
# install from CRANinstall.packages('rgoogleads')
# install from githubdevtools::install_github('selesnow/rgoogleads')
library(rgoogleads)rgoogleads is R client for work with Google Ads API v8. Main goal ofrgoogleads - load report data from Google Ads client account into R for analysis and visualizations.
Capabilities ofrgoogleads:
- 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.
Thergoogleads package for authorization uses thegargle package, the credentials obtained during authorization are stored exclusively on your local PC, you can find out the folder into which the credentials are cached using thegads_auth_cache_path() function.
For loading data from Google Ads Accountrgoogleads needshttps://www.googleapis.com/auth/adwords scope (Manage Your Google AdWords Campaigns), seeofficial Google Ads API documentation.
The package does not transfer your credentials or data obtained from your advertising accounts to third parties, however, the responsibility for information leakage remains on the side of the package user. The author does not bear any responsibility for their safety, be careful when transferring cached credentials to third parties.
For more details, I recommend that you read the following articles from the official documentation of the gargle package:
You rungads_auth('me@gmail.com') and startOAuth Dance in the browser:
Upon success, you see this message in the browser:
Authentication complete. Please close this page and return to R.
And you credentials cached locally on your PC in the form of RDS files.
- By default, gargle caches user tokens centrally, at the user level, and their keys or labels also convey which Google identity is associated with each token.
- Token storage relies on serialized R objects. That is, tokens are stored locally on your PC in the form of RDS files.
You can use own OAuth app:
app<-httr::oauth_app(appname="app name",key="app id",secret="app secret")gads_auth_configure(app=app)# or from json filegads_auth_configure(path='D:/ga_auth/app.json')# run authorizationgads_auth('me@gmail.com')
For obtain own developer token and OAuth client read the following documentation:
library(rgoogleads)# set own oauth appgads_auth_configure(path='C:/auth/app.json')# set your developer token if needed, or use default developer tokengads_auth(email='me@gmail.com',developer_token="own developer token")# get list of accessible accountsmy_accounts<- gads_get_accessible_customers()# set manager account id (options)gads_set_login_customer_id('xxx-xxx-xxxx')# set client account idgads_set_customer_id('xxx-xxx-xxxx')# load report dataad_group_report<- gads_get_report(resource="ad_group",fields= c("ad_group.campaign","ad_group.id","ad_group.name","ad_group.status","metrics.clicks","metrics.cost_micros"),date_from="2021-06-10",date_to="2021-06-17",where="ad_group.status = 'ENABLED'",order_by= c("metrics.clicks DESC","metrics.cost_micros"))
For get help ofrgoogleads use?rgoogleads or?gads_get_report.
You can follow the package updates at thelink.
If you encounter an error in the package, or you have suggestions for improving its functionality, you can create a issue using thelink.
This section contains links to articles dedicated torgoogleads.
- Русскоязычные материалы
- Официальный плейлист с видео уроками
- Авторизация в Google Ads API и запрос иерархии аккаунтов,Alexey Seleznev
- Запрос отчётов из Google Ads API,Alexey Seleznev
- Миграция с Google AdWords API на Google Ads API: подробный мануал,Alexey Seleznev
- Как визуализировать показатель качества ключевых слов — рецепт скрипта на языке R,Alexey Seleznev
- Как оценить потерянный доход в Google Ads с помощью языка R,Alexey Seleznev
- Доклад: Зачем интернет маркетологу понимать что такое API. Разбираем устройство API Google Ads (Конференция 8P 2021),Alexey Seleznev
- Официальный плейлист с видео уроками
- English
If you have published an article aboutrgoogleads let me know about it intelegram oremail and I will add it to the list of links.
Alexey Seleznev, Head of analytics dept. atNetpeak
Telegram Channel:R4marketing
email:selesnow@gmail.com
facebook:facebook.com/selesnow
blog:alexeyseleznev.wordpress.com
About
R package for loading data from Google Ads API
Resources
License
Unknown, MIT licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
