Re: Monthly Report Not Returnning Full Data

2015-04-15 Thread basker reddy

Hi,

i am using below function 

function DownloadDestinationUrlReport(AdWordsUser $user, $filePath) {
  // Load the service, so that the required classes are available.
  $user->LoadService('ReportDefinitionService', 'v201502');
  // Create selector.
  $selector = new Selector();
#$selector->fields = array('AccountCurrencyCode', 
'AccountDescriptiveName', 'AccountTimeZoneId', 'AdGroupId', 'AdGroupName', 
'AdGroupStatus', 'AdNetworkType1', 'AdNetworkType2', 'AverageCpc', 
'AverageCpm', 'AveragePosition', 'CampaignId', 'CampaignName', 
'CampaignStatus', 'Clicks', 'ClickType', 'ConversionCategoryName', 
'ConversionRate', 'ConversionRateManyPerClick', 'Conversions', 
'ConversionsManyPerClick', 'ConversionTrackerId', 'ConversionTypeName', 
'ConversionValue', 'Cost', 'CostPerConversion', 
'CostPerConversionManyPerClick', 'CriteriaDestinationUrl', 
'CriteriaParameters', 'CriteriaStatus', 'CriteriaTypeName', 'Ctr', 
'CustomerDescriptiveName', 'Date', 'DayOfWeek', 'Device', 
'EffectiveDestinationUrl', 'ExternalCustomerId', 'Impressions', 
'IsNegative', 'Month', 'MonthOfYear', 'PrimaryCompanyName', 
'PrimaryUserLogin', 'Quarter', 'Slot', 'TotalConvValue', 'ValuePerConv', 
'ValuePerConversion', 'ValuePerConversionManyPerClick', 
'ValuePerConvManyPerClick', 'ViewThroughConversions', 'Week', 'Year');

#$selector->fields = array('EffectiveDestinationUrl', 'Impressions', 
'Clicks', 'Cost', 'Conversions','Date','AdNetworkType1');
$selector->fields = array('CreativeDestinationUrl', 'Impressions', 
'Clicks', 'Cost', 'ConvertedClicks','Date','AdNetworkType1');
$sql = "select date_format(date_sub(now(),interval 1 day),'%Y%m%d') as 
date";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$startdate = $row['date'];
$enddate = $row['date'];
$startdate = '20150301';
$enddate = '20150331';
$selector->dateRange=array('min'=>"$startdate",'max'=>"$enddate");

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

  // Exclude criteria that haven't recieved any impressions over the 
date range.
  $reportDefinition->includeZeroImpressions = FALSE;

  // Set additional options.
//  $options = array('version' => 'v201502', 'returnMoneyInMicros' => 
false);
$options = array('version' => 'v201502');

  // Download report.
  ReportUtils::DownloadReport($reportDefinition, $filePath, $user, 
$options);
return $filePath;
}

i am just changing the date range as 
from 
$startdate = '20150301';
$enddate = '20150301';  

to 

$startdate = '20150301';
$enddate = '20150331';

please help on this 


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/bc5d6829-dd18-47a6-be13-8a3be2c7f5d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Expected clickthrough rate, Ad relevance, Landing page experience

2014-05-16 Thread basker reddy
Hi,

>From The Above Code 

https://developers.google.com/adwords/api/docs/reference/v201206/AdGroupCriterionService.QualityInfo

gives the same info as displayed on the web interface (when we hover the 
mouse over the keyword's 'bubble' under the 'Status' column).

However, the values displayed on the web interface (for each parameter) can 
be one of 3:

   1. Above average
   2. Average
   3. Below average


using this code we are getting only boolean values we are not getting the 
above values

is there any other service to get exact values

On Thursday, 6 March 2014 12:49:06 UTC-5, la...@techknowspace.com wrote:
>
> I got it.
>
>
>
> require_once dirname(dirname(__FILE__)) . '/init.php';
> // Enter parameters required by the code example.
> $adGroupId = '11172758199';
>
> function GetKeywordsExample(AdWordsUser $user, $adGroupId) {
>   // Get the service, which loads the required classes.
>   $adGroupCriterionService =$user->GetService('AdGroupCriterionService', 
> ADWORDS_VERSION);
>
>   // Create selector.
>   $selector = new Selector();
>   $selector->fields = 
> array('KeywordText','KeywordMatchType','QualityScore','IsKeywordAdRelevanceAcceptable','IsLandingPageLatencyAcceptable','IsLandingPageQualityAcceptable');
>
>   // Create predicates.
>   $selector->predicates[] = new Predicate('AdGroupId', 'IN', 
> array($adGroupId));
>
>   // Create paging controls.
>   $selector->paging = new Paging(0, 
> AdWordsConstants::RECOMMENDED_PAGE_SIZE);
>
>   do {
> // Make the get request.
> $page = $adGroupCriterionService->get($selector);
>
> // Display results.
> /* if (isset($page->entries)) {
>   foreach ($page->entries as $adGroupCriterion) {
>   printf("Keyword with text '%s', match type '%s', and ID '%s' was 
> '%s'"
>   . "found.\n", $adGroupCriterion->criterion->text,
>   $adGroupCriterion->criterion->matchType,
>   $adGroupCriterion->criterion->id);
>   }
> } else {
>   print "No keywords were found.\n";
> } */
>  echo '';
> print_r($page->entries);
>
> // Advance the paging index.
> $selector->paging->startIndex += 
> AdWordsConstants::RECOMMENDED_PAGE_SIZE;
>   } while ($page->totalNumEntries > $selector->paging->startIndex);
> }
>
> // Don't run the example if the file is being included.
> if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
>   //return;
> }
>
> try {
>   // Get AdWordsUser from credentials in "../auth.ini"
>   // relative to the AdWordsUser.php file's directory.
>   $user = new AdWordsUser();
>
>   // Log every SOAP XML request and response.
>   $user->LogAll();
>
>   // Run the example.
>   GetKeywordsExample($user, $adGroupId);
> } catch (Exception $e) {
>   printf("An error has occurred: %s\n", $e->getMessage());
> }
>
>
>
> On Thursday, March 6, 2014 12:24:35 PM UTC-5, la...@techknowspace.comwrote:
>>
>> Hey,
>>
>> Is there any PHP example how can I retrieve that data.
>>
>> I'm having hard time to get it.
>>
>>
>> On Wednesday, March 5, 2014 5:15:50 PM UTC-5, Ray Tsang (AdWords API 
>> Team) wrote:
>>>
>>> Lasha,
>>>
>>> You'll need to use the AdGroupCriterionService, and check the selector 
>>> documentations
>>> .
>>>
>>> Cheers,
>>>
>>> Ray
>>>
>>> On Wednesday, March 5, 2014 5:05:19 PM UTC-5, la...@techknowspace.comwrote:

 Thanks,

 I use PHP to get Reports. Which approach should I use to get 
 QualityInfo
 .

 I'm having difficulty to find one.

 Thanks ahead

 On Wednesday, March 5, 2014 1:49:34 PM UTC-5, Ray Tsang (AdWords API 
 Team) wrote:
>
> Lasha,
>
> Thanks for confirming.  The information in 
> QualityInfois
>  the data that are available at the moment.
>
> Cheers,
>
> Ray
>
>
> On Tuesday, March 4, 2014 6:19:27 PM UTC-5, la...@techknowspace.comwrote:
>>
>> Hey
>>
>> When you got to keywords tab from UI and hover on one of the keywords 
>> status you see it there.
>>
>> Quality score Learn 
>> more
>>  
>> 8/10
>>  
>>
>>- Expected clickthrough 
>> rate:
>> Average
>>- Ad 
>> relevance:
>> Above average
>>- Landing page 
>> experience:
>> Above average
>>
>>
>>
>> On Tuesday, February 11, 2014 11:59:31 AM UTC-5, Ray Tsang (AdWords 
>> API Team) wrote:
>>>
>>> Lasha,
>>>
>>> Could I trouble you to confirm