Hi,

I am finding the way to obtain impressions, clicks and CTR data of ads by 
day.
If the campaign duration is 30 days, I want to obtain the ads data of each 
day separately for 30 days.

Here is the PHP code we made.

<?php
error_reporting(E_STRICT | E_ALL); 
$filePath = dirname(__FILE__) . '/tests/'; 
set_include_path(get_include_path() . PATH_SEPARATOR . $filePath); 
require_once 'Google/Api/Ads/AdWords/Lib/AdWordsUser.php'; 

  $user = new AdWordsUser(); 
  $user->LogDefaults(); 
  $user->SetClientCustomerId('xxx-xxxx-xxx');

// Create selector.
$selector = new Selector();
$selector->fields = array('Id', 'AdGroupName', 'AdGroupStatus',  'Status', 
'AdType', 'DisplayUrl', 'CreativeDestinationUrl', 'CreativeFinalUrls', 
'CreativeTrackingUrlTemplate', 'CreativeUrlCustomParameters','Impressions', 
'Clicks', 'Cost', 'Ctr');

// Filter out removed criteria.
$selector->predicates[] = new Predicate('CampaignId', 'IN', 'xxxxxxxxx');
//$selector->predicates[] = new Predicate('AdGroupStatus', 'NOT_IN', 
array('REMOVED'));
//$selector->predicates[] = new Predicate('Status', 'NOT_IN', 
array('DISABLED'));
  $startDate = '20150101'; 
  $endDate = '20150812'; 
  $selector->dateRange = new DateRange($startDate, $endDate); 

// Create report definition.
$reportDefinition = new ReportDefinition();
$reportDefinition->selector = $selector;
$reportDefinition->reportName = 'Ad Performance Report #' . uniqid();
$reportDefinition->dateRangeType = 'CUSTOM_DATE';
$reportDefinition->reportType = 'AD_PERFORMANCE_REPORT';
$reportDefinition->downloadFormat = 'CSV';

// Set additional options.
  $options = array('returnMoneyInMicros' => TRUE);
ReportUtils::DownloadReport($reportDefinition, $filePath, $user, $options);
?>


Could you advise how to obtain them?
Or do you have a code sample or tips etc for this issue?

Thank you very much for your support.




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/29694dbe-51cd-40c2-8d66-53c24c1193c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to