PHPackages                             joelbutcher/googleads - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. joelbutcher/googleads

ActiveLibrary[API Development](/categories/api)

joelbutcher/googleads
=====================

A lightweight and easy-to-configure extension for the Google Ads PHP Client, with OAuth2 support.

v10.0.0(1y ago)364121MITPHPPHP ^8.1

Since Apr 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/joelbutcher/googleads)[ Packagist](https://packagist.org/packages/joelbutcher/googleads)[ Fund](https://paypal.me/joelbutcher)[ GitHub Sponsors](https://github.com/joelbutcher)[ RSS](/packages/joelbutcher-googleads/feed)WikiDiscussions 10.x Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (29)Used By (1)

Google Ads Client OAuth2 Wrapper
================================

[](#google-ads-client-oauth2-wrapper)

 [ ![Build Status](https://github.com/joelbutcher/googleads/workflows/tests/badge.svg) ](https://github.com/joelbutcher/googleads/actions) [ ![Total Downloads](https://camo.githubusercontent.com/a4e574db9be1da8d1d9bb6d0bbfacded865592a48dd7a8c12588378dc6d8d0a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f656c627574636865722f676f6f676c65616473) ](https://packagist.org/packages/joelbutcher/googleads) [ ![Latest Stable Version](https://camo.githubusercontent.com/942ff75e884ffe004af4a06d92b075a9033f629f4462f75b5d8aefe00bb037f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f656c627574636865722f676f6f676c65616473) ](https://packagist.org/packages/joelbutcher/googleads) [ ![License](https://camo.githubusercontent.com/8279d14bc7897179494a810170295bea017b149e784111c958c4e390b8bb38c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a6f656c627574636865722f676f6f676c65616473) ](https://packagist.org/packages/joelbutcher/googleads)

A lightweight and easy-to-configure extension for the Google Ads PHP Client, with OAuth2 support.

Installation
------------

[](#installation)

Install the package using composer

`composer require joelbutcher/googleads

Configuration
-------------

[](#configuration)

To configure the service, provide an array with your `client_id`, `client_secret`, `developer_token` and Google Ads Account ID:

```
  $config = [
      'client_id' => '',
      'client_secret' => '',
      'developer_token' => '',
      'login_customer_id' => '',
  ];

  $googleAds = new GoogleAds($config);
```

> Note, if you're using an MCC (Manager account), `login_customer_id` will need to be your MCC account ID.

Usage
-----

[](#usage)

Once you've configured the client, you are then ready to start using the client to interact with Google Ads. First, we need to authorize the user with a refresh token. This can be obtained from a simple [OAuth flow](https://github.com/googleapis/google-api-php-client#authentication-with-oauth) with Google.

> Make sure to request the adwords scope in your OAuth2.0 authorization request.

```
  // ...
  $googleAds->authorize($refreshToken);
```

If you're using an MCC and have configured your `login_customer_id` to use the MCC account ID, you will need to pass the ID of the account you are acting on behalf of, as the second parameter to the `authorize` method:

```
  // ...
  $googleAds->authorize($refreshToken, '');
```

Interacting with Google Ads PHP SDK
-----------------------------------

[](#interacting-with-google-ads-php-sdk)

Now that you're all configured and authenticated, you can now begin interacting with the underlying `GoogleAdsClient` class. You can call any of the services found here directly from the your `$googleAds` instance from the snippets above. For example, to retrieve the Campaign Service Client, simply call the following:

```
  // ...
  $googleAds->getCampaignServiceClient();
```

Versioning
----------

[](#versioning)

Currently, we only support V9 of the Google Ads SDK.

Changelog
---------

[](#changelog)

Check out the [CHANGELOG](CHANGELOG.md) in this repository for all the recent changes.

Maintainers
-----------

[](#maintainers)

Developed and maintained by [Joel Butcher](https://joelbutcher.co.uk)

Credits
-------

[](#credits)

You can view all contributers [here](https://github.com/joelbutcher/googleads/graphs/contributors)

License
-------

[](#license)

This pacakge is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~62 days

Total

28

Last Release

581d ago

Major Versions

v5.0.1 → v6.0.02023-04-24

6.x-dev → 7.x-dev2023-11-06

v7.0.0 → v8.0.02024-02-09

8.x-dev → v10.0.02024-10-09

9.x-dev → 10.x-dev2024-10-13

PHP version history (5 changes)v1.0.0PHP ^7.3|^8.0

v1.1.0PHP &gt;=7.0 || &gt;=8.0

v4.0.0-betaPHP ^7.4|^8.0

v4.0.0PHP ^8.0

v10.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb6903ee363d9201681e47a2dcbe12148b7d299dd9e37229cad774ecd923fd6e?d=identicon)[joelbutcher](/maintainers/joelbutcher)

---

Top Contributors

[![joelbutcher](https://avatars.githubusercontent.com/u/7163152?v=4)](https://github.com/joelbutcher "joelbutcher (14 commits)")

---

Tags

googleAdvertisingGoogleAds

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/joelbutcher-googleads/health.svg)

```
[![Health](https://phpackages.com/badges/joelbutcher-googleads/health.svg)](https://phpackages.com/packages/joelbutcher-googleads)
```

###  Alternatives

[google/apiclient

Client library for Google APIs

9.8k191.4M997](/packages/google-apiclient)[google/apiclient-services

Client library for Google APIs

1.3k180.5M51](/packages/google-apiclient-services)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[revolution/laravel-google-sheets

Google Sheets API v4

4483.1M6](/packages/revolution-laravel-google-sheets)[pulkitjalan/google-apiclient

Google api php client wrapper with Cloud Platform and Laravel support

2582.9M5](/packages/pulkitjalan-google-apiclient)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
