Hi, 

i use Keywordless Category Report to get clicks for a DSA Campaign.

But the number of clicks it returns is not equal to the one i can see 
through my MCC.

In details, i have an AdGroup in one of my Campaigns, that through my MCC i 
see that it had 35 clicks the last 10 days.

But if i try to use API to get those clicks, i get only 28.

And if i try to get Yesterday's clicks, i get zero, while it had 7

Since 28+7=35, i think that for some reason, i cannot get Yesterday Clicks.

Any idea why sth this could happen?

Below i quote a part of my code.

Thanks in advance.






             // Get the service, which loads the required classes.
             $adGroupCriterionService 
=$user->GetService('AdGroupCriterionService', $adwords_version);
             
             // Create selector.
             $selector = new Selector();
 
             $selector->fields = array('Id', 'QualityScore', 'Status', 
'CpcBid','CriteriaType');
             
             // Create predicates.
             $selector->predicates[] = new Predicate('AdGroupId', 'IN', 
array($adGroupId));
             $selector->predicates[] = new Predicate('Id', 'IN', 
array($keywordId));
             
             $dateRange = new DateRange();
             $str1 = '-1 days'; 
             $str2 = '-1 days';
             if($days > 0)
              {
                $str1 = '-'.$days.' days';
                $str2 = '-'.$days.' days';
              }
            $dateRange->min = date('Ymd', strtotime($str1));
            $dateRange->max = date('Ymd', strtotime($str2));
            $selector->dateRange = $dateRange;
            
            // Create paging controls.
            $selector->paging = new Paging(0, 
AdWordsConstants::RECOMMENDED_PAGE_SIZE);
            
            do {
               // Make the get request.
               $page = $adGroupCriterionService->get($selector);
               
               if (isset($page->entries)) {
                   $html.="<br><b>INSIDE A 'FOREACH Criterion' LOOP (Found 
".count($page->entries).") records</b><br>";
                    foreach ($page->entries as $adGroupCriterion) {
                    
                        //#######################################
                          $user->LoadService('ReportDefinitionService', 
$adwords_version);
                          $selector8 = new Selector();
                          $selector8->fields = 
array('CriterionId','AverageCpc', 'CostPerConversion', 'Clicks', 
'Conversions', 'Cost', 'Ctr');
                          $selector8->predicates[] = new 
Predicate('AdGroupId','IN', array($adGroupId));
                          $selector8->predicates[] = new 
Predicate('CriterionId', 'IN', array($adGroupCriterion->criterion->id));
                          $selector8->dateRange = $dateRange;
                          
                          $reportDefinition8 = new ReportDefinition();
                          $reportDefinition8->selector = $selector8;
                          $reportDefinition8->reportName = 'KeywordLess 
performance report #' . uniqid();
                          $reportDefinition8->dateRangeType ='CUSTOM_DATE';
                          $reportDefinition8->reportType = 
'KEYWORDLESS_CATEGORY_REPORT';
                          $reportDefinition8->downloadFormat = 'CSV';
                          $options8 = array('version' => $adwords_version, 
'returnMoneyInMicros' => FALSE);
                          $filePathreport8='/tmp/keywordlessreport.txt';
                          ReportUtils::DownloadReport($reportDefinition8, 
$filePathreport8, $user, $options8);


........................................................................

 
...........................................................................................

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to