data-analytic/google-ads

Google Ads client for Data Analytic application

0.0.3 2021-05-28 13:42 UTC

This package is auto-updated.

Last update: 2024-04-28 19:48:01 UTC


README

Installation:

composer require data-analytic/google-ads

Example:

With historical metric and export into the excel file:

$data = [
      'keyWords' => ['apple', 'jam'],
      'languageCode' => 'en',
  ];
$googleAdsManager = new GoogleAdsManager(new ConnectionResolver());
$keyWordMetrics = $googleAdsManager->getKeywordMetric($data, 'EN');
Export::createXlsFile('test.xlsx', $keyWordMetrics);

OR

Without historical metric

$keywordIdeaMetrics = $googleAdsManager->getKeywordIdeaMetrics( $data, 'US');

Dependencies:

php > 7.2
phpoffice/phpspreadsheet
googleads/google-ads-php