Package Data | |
---|---|
Maintainer Username: | schulzefelix |
Maintainer Contact: | github@schulze.co (Felix Schulze) |
Package Create Date: | 2017-05-26 |
Package Last Update: | 2022-03-20 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:00:18 |
Package Statistics | |
---|---|
Total Downloads: | 2,404 |
Monthly Downloads: | 16 |
Daily Downloads: | 4 |
Total Stars: | 27 |
Total Watchers: | 6 |
Total Forks: | 8 |
Total Open Issues: | 1 |
This package can be installed through Composer.
$ composer require schulzefelix/laravel-adwords-targeting-idea-service
In Laravel 5.5 the package will autoregister the service provider. If package discovery is disabled add the following.
// config/app.php
'providers' => [
...
SchulzeFelix\AdWords\AdWordsServiceProvider::class,
...
];
In Laravel 5.5 the package will autoregister the facade. If package discovery is disabled add the following.
// config/app.php
'aliases' => [
...
'AdWords' => SchulzeFelix\AdWords\AdWordsFacade::class,
...
];
You can publish the config file of this package with this command:
php artisan vendor:publish --provider="SchulzeFelix\AdWords\AdWordsServiceProvider"
This requires that the clientId
and clientSecret
are from a native application.
Google Console: https://console.developers.google.com/apis/credentials
$ php artisan adwords:token
Open the authorization url. Grant access to the app and input the
access token in the console. Copy the refresh token into your configuration config/adwords-targeting-idea-service.php
All methods will return an Illuminate\Support\Collection
-instance.
Here are two basic example to retrieve search volumes for several keywords and new keyword ideas for a given word.
$searchVolumes = AdWords::searchVolumes(['cheesecake', 'coffee']);
$keywordIdeas = AdWords::keywordIdeas('coffee');
For Criteria ID see https://developers.google.com/adwords/api/docs/appendix/geotargeting
AdWords::location(2276)->searchVolumes(['cheesecake', 'coffee']);
For Criteria ID see https://developers.google.com/adwords/api/docs/appendix/codes-formats#languages
AdWords::location(2276)->language(1001)->searchVolumes(['cheesecake', 'coffee']);
AdWords::withTargetedMonthlySearches()->searchVolumes(['cheesecake', 'coffee']);
AdWords::convertNullToZero()->location(2276)->language(1001)->searchVolumes(['cheesecake', 'coffee']);
AdWords::location(2642)->exclude(['iphone'])->include(['apple'])->keywordIdeas('iphone');
Please see CHANGELOG for more information what has changed recently.
$ vendor/bin/phpunit
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email githubissues@schulze.co instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.