{"id":15407099,"url":"https://github.com/ltfschoen/skag_server_rails","last_synced_at":"2026-04-30T00:32:30.317Z","repository":{"id":76620324,"uuid":"96310791","full_name":"ltfschoen/skag_server_rails","owner":"ltfschoen","description":"Ruby on Rails app using OAuth2 and AdWords API","archived":false,"fork":false,"pushed_at":"2017-07-25T12:26:27.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:28:23.447Z","etag":null,"topics":["adwords-api","oauth2","ruby-on-rails","ruby-sdk"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ltfschoen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-05T11:12:56.000Z","updated_at":"2017-07-05T11:16:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"19b75794-3297-4563-bbe3-e177a844ea1f","html_url":"https://github.com/ltfschoen/skag_server_rails","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"15ad3d58770e363efd4acbb647554cc0b5da49a6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ltfschoen/skag_server_rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fskag_server_rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fskag_server_rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fskag_server_rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fskag_server_rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltfschoen","download_url":"https://codeload.github.com/ltfschoen/skag_server_rails/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltfschoen%2Fskag_server_rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32449784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adwords-api","oauth2","ruby-on-rails","ruby-sdk"],"created_at":"2024-10-01T16:27:02.838Z","updated_at":"2026-04-30T00:32:30.302Z","avatar_url":"https://github.com/ltfschoen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"AdWords on Rails\n================\n\n## Screenshots\n\n![alt tag](https://raw.githubusercontent.com/ltfschoen/skag_server_rails/master/screenshots/index.png)\n\nGoogle's AdWords API service lets developers design computer programs that\ninteract directly with the AdWords platform. With these applications,\nadvertisers and third parties can more efficiently -- and creatively -- manage\ntheir large or complex AdWords accounts and campaigns.\n\nThis program adapts the [AdWords on Rails sample application](https://github.com/googleads/google-api-ads-ruby) that demonstrated how to access the AdWords API from within a Ruby on Rails environment. It is based on the [Google Ruby\nAdWords API client library](https://github.com/googleads/google-api-ads-ruby).\n\nThe application demonstrates the following:\n\n - Authorization against AdWords with OAuth schema and credentials re-use.\n - Simple service request (CampaignService.get) and displaying the results.\n - Basic AdHoc reporting functionality with downloads support.\n\n## AdWords\n\n\n* AdWords Setup\n    * Initial Setup of AdWords Product, Test, and Google Accounts\n        * Create New Production Google Account (i.e. ltfschoen)\n            * Create New Google Account for Production https://accounts.google.com/SignUp?hl=en\n            * Create AdWards Production MMC Account https://adwords.google.com/um/Welcome/Home\n            * Click Gear Icon (Manager account)\n                * Account Settings\n                    * AdWords API Center\n                        * Create Token for Independent AdWords Developer with \"Test Accounts\" Access Level\n            * Note: Use API Tokens from Production MMC Account in app\n        * Create New Test AdWords Account (i.e. ltfschoentest100)\n            * Create New Google Account for Test Account\n            * Create AdWords Test Account https://adwords.google.com/um/Welcome/?sf=mt\n                * Select \"To manage other people's accounts\" (NOT \"To manage my accounts\")\n                * Click Gear Icon\n                    * Account Settings\n                        * Account Access\n                            * Invite your Production MMC Account\n                * Create Client Account within Adwords Test Account\n                    * Click ACCOUNT \u003e New AdWords account (i.e. ltfschoen200)\n                * Create Campaign within ltfschoen100 (Test Account) under ltfschoen200 (Client Account)\n    * Workflow within Rails app\n        * Click \"Proceed\"\n        * Login with Google Account of AdWords Test Account (i.e. ltfschoen100)\n        * Click \"List Accounts\"\n            * Note: To view hierarchy of accounts from a different Production MMC Account then use their developer token instead and have that production account send an access invitation to ltfschoen100.\n            * Select Account: ltfschoen200 (since used to create Campaign)\n        * Click \"List Campaigns\"\n\n* AdWords Other\n    * Reports \u0026 Measure Reports - https://developers.google.com/adwords/api/docs/guides/uireports\n        * Campaign Negative Keywords Performance Report - https://developers.google.com/adwords/api/docs/appendix/reports#campaign-negative-keywords\n        * Ad Groups Report - https://developers.google.com/adwords/api/docs/appendix/reports#ad-group\n        * Ad Performance Report - https://developers.google.com/adwords/api/docs/appendix/reports#ad\n        * Keywords Performance Report - https://developers.google.com/adwords/api/docs/appendix/reports#keywords\n        * Display Keyword Performance Report - https://developers.google.com/adwords/api/docs/appendix/reports#display-keyword\n        * **Search Query Performance Report**\n            * https://developers.google.com/adwords/api/docs/appendix/reports#search-query\n            * https://developers.google.com/adwords/api/docs/appendix/reports/search-query-performance-report\n            * See what people searching and if matches keywords\n            * All Campaigns \u003e Query \u003e Search Terms (requires live ads)\n            * Fields:\n                * CampaignId, AdGroupStatus, Ctr, Impressions, Clicks, AverageCpc\n            * Notes\n                * Example Ruby Code Snippets for AdWords API https://developers.google.com/adwords/api/docs/samples/ruby/reporting\n                * Add Add Group\n                    * https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201702/basic_operations/add_ad_groups.rb\n                * Search Query Performance Report\n                    * Goal:\n                        * Increase:\n                            * Ctr (click through rates)\n                        * Decrease:\n                            * Cpc (cost per click)\n                            * CPA (cost per acquisition)\n                        * Maintain:\n                            * Impressions\n                            * Clicks\n                            * Conversions\n                    * Problems\n                        * Situation - Broad Match Search Terms - ads show for broad search phrases very different\n                        from keyword bidding on.\n                            * i.e. broad match search term results in ad served on related terms with synonymns that increase Ad Impressions but not good if not selling regular shoes but instead selling specialised goods (i.e. sports shoes)\n                                * Bid Broad Match - \"women’s sports shoes\"\n                                * Ad Served - \"ladies sports shoes\", \"shoes for women\"\n                        * Issue - Quality Score lowers, Cpc increases, Conversion rate lowers, CPA increases\n                    * Strategies\n                        * Remove Search Terms with low performance (conversion rate)\n                * **IN PROGRESS**\n                * Reference: https://reportgarden.com/2016/08/02/adwords-search-terms-reports/\n            * SciRuby\n                * Daru\n                    * https://github.com/SciRuby/daru\n                    * https://github.com/domitry/nyaplot\n                    * http://v0dro.github.io/blog/2014/11/25/data-analysis-in-ruby-basic-data-manipulation-and-plotting/\n                    * http://nbviewer.jupyter.org/github/SciRuby/sciruby-notebooks/tree/master/\n            * Links\n                * https://developers.google.com/adwords/api/docs/guides/reporting\n                * Export Report https://reportgarden.com/2016/08/02/adwords-search-terms-reports/\n                * https://groups.google.com/forum/#!topic/adwords-api/6_se0m7g1v8\n\n\t* Setup Developer Account Links\n\t\t* https://developers.google.com/adwords/api/docs/guides/reset-devtoken\n\t\t* https://support.google.com/adwords/answer/6139186\n\t\t* https://adwords.google.com/home/tools/manager-accounts/\n\t\t* https://developers.google.com/adwords/api/docs/guides/signup\n\t\t* https://groups.google.com/forum/#!topic/adwords-api/ZmNKYoLjpYc\n\t\t* https://groups.google.com/forum/#!topic/adwords-api/rdDyOLlH3Ls\n\t\t* https://developers.google.com/adwords/api/docs/reference/v201702/CustomerService\n\t\t* https://developers.google.com/adwords/api/docs/guides/accounts-overview#test_accounts\n        * https://medium.com/@MihaZelnik/how-to-create-test-account-for-adwords-api-503ca72b25a4\n        * IGNORE\n            * Created Account ltfschoen101 \"To manage my accounts\"\n            * Configure Test Account\n                * ACCOUNT \u003e Link existing accounts \u003e Enter customer IDs (i.e. the Production MCC ID)\n            * Go to \"Manually set account ID\" within the app at localhost:3000\n                * Enter Account clientCustomerID (CID) of Test Account (i.e. 000-000-0000) shown at https://adwords.google.com/cm/CampaignMgmt\n            * Click List Campaigns on Home page\n\t* API Methods\n\t\t* get_customers\n\t\t\t* http://googleadsdeveloper.blogspot.com.au/2016/10/access-multiple-adwords-accounts-with.html\n\t* Support\n\t\t* 1800 988 571 for free advice on customizing your account\n\n## Setup\n\n* IntelliJ IDE Config\n\n    * Fix error: \"No Rails found in SDK\" IntelliJ\n\n        * Edit Configurations \u003e Click \"+\" \u003e Select \"Rails\" \u003e for \"Ruby SDK\" choose \"Use other SDK\" and select 'RVM: ruby-2.4.1 [skag_server_rails_app]'\n\n        * File \u003e Project Structure \u003e Project Settings \u003e Project SDK \u003e select 'RVM: ruby-2.4.1 [skag_server_rails_app]'\n\n        * File \u003e Project Structure \u003e Platform Settings \u003e SDK \u003e Select 'RVM: ruby-2.4.1 [skag_server_rails_app]' \u003e Change \"Gems bin directory\" to the directory shown when you run `which rails` from the project directory (but remove `rails` from the end i.e. `/Users/Me/.rvm/gems/ruby-2.4.1@skag_server_rails_app/bin`)\n\n    * Fix error: Rails server launcher wasn't found in project\n        * Refer to my Stackoverflow post here: https://stackoverflow.com/questions/30141740/rubymine-rails-server-launcher-wasnt-found-in-the-project/44922746#44922746\n\n* Run Locally\n\n    * Check Ruby 2.2 or later installed:\n\n    * Update RubyGems http://railsapps.github.io/updating-rails.html\n        ```\n        gem -v\n        gem update --system\n        ```\n\n    * Create Gemset with RVM\n        ```\n        ruby -v\n        rvm list\n        rvm use ruby-2.4.1\n        rvm gemset create skag_server_rails_app2.4.1\n        rvm --ruby-version use 2.4.1@skag_server_rails_app2.4.1\n        rvm gemset list\n        rvm gemdir\n        ```\n\n    * Fix missing Bin directory\n        ```\n        rake rails:update:bin\n        ```\n\n    * Install dependencies\n        ```\n        gem install rails -v 5.1.2\n        gem install bundle\n        bundle install -V\n        ```\n\n    * Open PostgreSQL\n\n    * Initialize local PostgreSQL schema:\n        ```\n        rails db:create db:migrate RAILS_ENV=\"development\"\n        ```\n\n    * Configure AdWords API settings:\n        * Guides:\n            * https://github.com/googleads/google-api-ads-ruby\n            * https://github.com/googleads/google-api-ads-ruby/wiki/API-access-using-own-credentials-(installed-application-flow)\n                * https://developers.google.com/adwords/api/docs/guides/authentication#installed\n        * Login and Create Project in Google API Manager https://console.developers.google.com\n        * Create Credentials\n            * OAuth Client ID\n                * Fill out the OAuth Consent Form\n                * Select \"Web Application\" Application Type\n                (it may be necessary to also create \"Other\" Type first)\n                * Copy the OAuth Client ID and Secret that are shown\n                into .env\n                * Restrictions\n                    * Authorized JavaScript origins\n                        * http://localhost:3000\n                    * Authorized redirect URIs (callbacks)\n                        * http://localhost:3000/login/callback\n\n\n        ```\n        subl config/adwords_api.yml\n        ```\n\n    * Start the server. Open in browser:\n        ```\n        rails server;\n        open http://localhost:3000\n        ```\n\n## Usage\n\nTo access AdWords data the app needs to be granted access by a\nlogged in user. The user is automatically redirected to a page with login prompt\nwhen not yet authorized.\n\nAfter being prompted with say `SKAG Server Rails wants to Manage your AdWords campaigns`, to grant access, click the 'Proceed' link. Ensure you are on the Google login\npage, log in with your AdWords account credentials and select 'Grant access'.\n\nNote: Granting access to the application will only allow access to the AdWords\ndata for the account. Other services will not be accessible.\n\nOnce logged in you can retrieve the accounts list, select an account and browse\nthe campaigns list or download a report with the corresponding menu items.\n\n\n## Configuring the Ruby AdWords API library\n\nTo be able to use the AdWords API there are a few parameters that need to be\nspecified. The configuration file is located under the 'config' directory and\nnamed adwords_api.yml.\n\nFor details regarding configuration directive please refer to the [library\nREADME](https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/README.md).\n\n\n## Production accounts\n\nThis demo is capable of accessing production accounts. Although the app doesn't\nperform any mutate operations, it is best to be careful especially if modifying it to include additional functionality.\n\n\n## Links\n\n* Bug reports - https://github.com/googleads/google-api-ads-ruby/issues\n* Forums - https://groups.google.com/forum/#!forum/adwords-api\n* Google Plus page for API change announcements and\nother news - https://plus.google.com/+GoogleAdsDevelopers\n* Original Authors - Danial Klimkin, Michael Cloonan\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Fskag_server_rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltfschoen%2Fskag_server_rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltfschoen%2Fskag_server_rails/lists"}