{"id":18619857,"url":"https://github.com/banboo-data/r4googleads","last_synced_at":"2025-04-11T02:30:52.087Z","repository":{"id":43680866,"uuid":"196394969","full_name":"banboo-data/r4googleads","owner":"banboo-data","description":"R client library for the Google Ads API","archived":false,"fork":false,"pushed_at":"2022-02-28T11:25:14.000Z","size":625,"stargazers_count":5,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T08:11:17.473Z","etag":null,"topics":["google-ads-api","marketing-analytics","marketing-automation","r"],"latest_commit_sha":null,"homepage":"https://banboo-data.github.io/r4googleads/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/banboo-data.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-11T12:58:23.000Z","updated_at":"2025-03-24T02:42:11.000Z","dependencies_parsed_at":"2022-08-21T00:40:25.116Z","dependency_job_id":null,"html_url":"https://github.com/banboo-data/r4googleads","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banboo-data%2Fr4googleads","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banboo-data%2Fr4googleads/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banboo-data%2Fr4googleads/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banboo-data%2Fr4googleads/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/banboo-data","download_url":"https://codeload.github.com/banboo-data/r4googleads/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329522,"owners_count":21085549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["google-ads-api","marketing-analytics","marketing-automation","r"],"created_at":"2024-11-07T04:03:34.976Z","updated_at":"2025-04-11T02:30:51.838Z","avatar_url":"https://github.com/banboo-data.png","language":"R","funding_links":["https://www.buymeacoffee.com/banboo"],"categories":[],"sub_categories":[],"readme":"\n# r4googleads -\u003cbr\u003e R Client Library for Google's Ads Interface\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/r4googleads)](https://CRAN.R-project.org/package=r4googleads)\n[![CRAN monthly downloads](https://cranlogs.r-pkg.org/badges/r4googleads)](https://cran.r-project.org/package=r4googleads)\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)\n[![R-CMD-check](https://github.com/banboo-data/r4googleads/workflows/R-CMD-check/badge.svg)](https://github.com/banboo-data/r4googleads/actions)\n\u003c!-- badges: end --\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/banboo\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\nWelcome to the source code repository of the {**r4googleads**} package. {r4googleads} helps you to implement your advertising performance analytics in R and increase your efficiency, make your reports reproducible and flexible enough to managing even large, complex Google Ads accounts and campaigns.\n\nIf you came for the user documentation and howto, please visit {**r4googleads**}' our *pkgdown* [documentation site](https://banboo-data.github.io/r4googleads/). \n\nThe {**r4googleads**} package uses Google Ads' application programming interface to conveniently load data from *Google Ads* into an **R** environment. The Google Ads API suceeds Google's *Adwords API* and consequently, {**r4googleads**} suceeds its popular predecessor R package {**RAdwords**}.\n\n\n## Installation\n\nTo install the latest stable version of {**r4googleads**} from R's official Comprehensive R Archive Network (CRAN) run\n\n```r\ninstall.packages(\"r4googleads\")\n```\n\nor install the latest development release from GitHub using the [{remotes}](https://CRAN.R-project.org/package=remotes) R package. \n(the below example code assumes the {remotes} package has been installed previously.)\n\n```r\nremotes::install_github(\"banboo-data/r4googleads\")\n```\n\n## Basic Example - Load Data\n\n```r\nlibrary(r4googleads)\n```\n\nTo specify which data you want to load into your R session you can use Google's own [SQL reminiscant query language](https://developers.google.com/google-ads/api/fields/v9/overview_query_builder). The above link helps you to find out about available reports and to validate your queries online.\n\n```r\ng_query \u003c- \"SELECT\n                campaign.name, \n                campaign.status,\n                segments.device, \n                metrics.impressions,\n                metrics.clicks, \n                metrics.ctr,\n                metrics.average_cpc, \n                metrics.cost_micros\n              FROM campaign\n              WHERE segments.date DURING LAST_30_DAYS\n              AND metrics.impressions \u003e 0\n              PARAMETERS include_drafts=true\"\n```\n\nThe next step is to create a *service object* that contains the query string, your Google Ads Account ID and the API version you want to use. The example goes on to use one of our 3 constructors to create different service objects: *googleAdsSearch*, *googleAdsFields*,\n*listAccessibleCustomers*. \n\n```r\nquery_service \u003c- googleAdsSearch(\n  aid = '***-****-***', # Google Ads Account ID\n  query = g_query,\n  api_version = 'v9'\n  )\n```\n\nthe resulting service query object can be passed on to the *query_google_ads* functions which sends the service object to Google's actual API service. Note, that a *MCC* ID is needed here. The handler inside *query_google_ads* processes the service object depending on its class and starts the corresponding request. \n\n```r\nd \u003c- query_google_ads(\n  mcc_id = '***-***-****', # Google Ads My Client Center ID\n  google_auth = google_auth,\n  service = query_service,\n  raw_data = F\n)\n```\n\nTo learn more about creating and using our service objects visit the {r4googleads} [pkgdown documentation site](https://banboo-data.github.io/r4googleads/). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanboo-data%2Fr4googleads","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbanboo-data%2Fr4googleads","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanboo-data%2Fr4googleads/lists"}