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-10-28 20:53:15 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