tmarois/laravel-ads-sdk

This package is abandoned and no longer maintained. The author suggests using the https://github.com/Grayscale/laravel-ads-sdk package instead.
There is no license information available for the latest version (v1.2.11) of this package.

A Laravel Ads SDK for Google Ads, Bing Ads and Facebook Ads

v1.2.11 2019-03-29 16:44 UTC

README

Slack

For Google Ads, Bing Ads and Facebook Ads APIs.

This is a wrapper for connecting each ad source into your Laravel application. This SDK provides simpler and consistent methods across many ad source integrations than the traditional SDKs; ultimately making it a lot easier to implement in your projects. You shouldn't have to learn how to communicate and understand the responses to every API.

The goal of this package is to provide you with one SDK to manage them all.

(1) Installation

Use Composer to install package.

Run composer require grayscale/laravel-ads-sdk:^1.2

(2) Laravel Config

Run php artisan vendor:publish, then copy these to your .env and update with your credentials.

ADWORDS_DEVELOPER_TOKEN=""
ADWORDS_OAUTH2_CLIENT_ID=""
ADWORDS_OAUTH2_CLIENT_SECRET=""
ADWORDS_OAUTH2_REFRESH_TOKEN=""

BING_DEVELOPER_TOKEN=""
BING_CLIENT_ID=""
BING_CLIENT_SECRET=""
BING_REFRESH_TOKEN=""

(3) For GoogleAds

Follow the steps in the command line to generate a refresh token.

Run php artisan laravelads:token:generate --service=GoogleAds

(4) For BingAds

Follow the steps in the command line to generate a refresh token.

Run php artisan laravelads:token:generate --service=BingAds

Having Trouble? Learn More

(5) Usage

Accessing GoogleAds or BingAds services use the following:

// The namespace to the Facade
use LaravelAds;

// calling the Google Ads Service and including the Customer Client Id
$googleAds = LaravelAds::googleAds()->with('CLIENT_ID');

// calling the Bing Ads Service and including the Customer Client Id
$bingAds = LaravelAds::bingAds()->with('CLIENT_ID');

Google Ads

This uses the googleads-php-lib SDK for the Google Ads API

NOTICE – You will need to Request Google Ads API Access.

Management

Reports

Bing Ads

This uses the BingAds-PHP-SDK for the Bing Ads API

NOTICE – You will need to Request Bing Ads API Access.

Management

Reports

Facebook Ads

This uses the facebook-php-business-sdk for Facebook Marketing API

Coming Soon. Looking for contributors.

Contributions

We are actively looking for new contributors.

If you want to help, join the slack channel and/or submit pull requests.

License

Laravel Ads SDK (This Package) is open-sourced software licensed under the MIT license.