Skip to content

Simplifies using the google-ads-php client library and Google Ads Query Language in Laravel

License

Notifications You must be signed in to change notification settings

ZeekInteractive/laravel-googleads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

laravel-googleads

Simplifies using the google-ads-php client library and Google Ads Query Language in Laravel

Installation

composer require luketowers/laravel-googleads

Configuration

php artisan vendor:publish --provider="LukeTowers\GoogleAds\GoogleAdsServiceProvider"

Modify the config/googleads.php file to include your Google Ads credentials and other settings.

Usage

Get the Google Ads client

$googleAds = App::make('google-ads');

or

use LukeTowers\GoogleAds\GoogleAds;

$googleAds = new GoogleAds([
    'developerToken' => env('GOOGLE_ADS_DEVELOPER_TOKEN'),
    'clientCustomerId' => env('GOOGLE_ADS_CLIENT_CUSTOMER_ID'),
    'loginCustomerId' => env('GOOGLE_ADS_LOGIN_CUSTOMER_ID'),
    'clientId' => env('GOOGLE_ADS_CLIENT_ID'),
    'clientSecret' => env('GOOGLE_ADS_CLIENT_SECRET'),
    'refreshToken' => env('GOOGLE_ADS_REFRESH_TOKEN'),
]);

Google Ads Query Language

use LukeTowers\GoogleAds\GoogleAds;

$googleAds = new GoogleAds();
$googleAds->query('SELECT campaign.id, campaign.name FROM campaign');

Related Resources:

About

Simplifies using the google-ads-php client library and Google Ads Query Language in Laravel

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages