AdWords
3.9K members online now
3.9K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

AdGroupAdService not providing all Ads - v201406

MWA
Follower ✭ ☆ ☆
# 1
MWA
Follower ✭ ☆ ☆

AdGroupAdService not providing all Ads - v201406


Hi,

I am trying to retrieve Ads data from Adwords API v201406.

I am getting stats like this

$reportQuery = "SELECT AveragePosition,AverageCpc,AverageCpm,Impressions,Clicks,Cost,Ctr,Conversions,ConversionRate,CostPerConversion,
ViewThroughConversions,ConversionsManyPerClick,ConversionRateManyPerClick,CostPerConversionManyPerClick,AdNetworkType1,Id,AdGroupId
FROM AD_PERFORMANCE_REPORT";

$reportQuery .= " DURING " . $dateRange;

$options = array('version' => ADWORDS_LATEST_VERSION);

$stats =  ReportUtils:Smiley Very HappyownloadReportWithAwql($reportQuery, $Path, $user, $reportFormat, $options);



Then I am converting $stats into array format $statsArray and then collecting all AdIds. After that I am trying to retrieve other data from
AdGroupAdService using code below. $adIds have all the AdIds parsed from $statsArray.

$adGroupAdService = $user->GetService('AdGroupAdService', ADWORDS_LATEST_VERSION);

$selector = new Selector();

$selector->fields = array('Id','AdGroupId','Status','DisplayUrl','AdGroupAdDisapprovalReasons','Headline','Description1','Description2',
'ImageCreativeName','MobileAdDescription','MobileAdMarkupLanguages','MobileAdMobileCarriers','MobileAdBusinessName','MobileAdCountryCode',
'MobileAdPhoneNumber','MediaId','Dimensions','Urls','MimeType','SourceUrl','FileSize','CreationTime','ReferenceId','TemplateId','TemplateAdUnionId','UniqueName','TemplateElementFieldName','TemplateElementFieldType','TemplateElementFieldText');

$selector->predicates[] = new Predicate('Id', 'IN', $adIds);

$page = $adGroupAdService->get($selector);



The problem is $stat is providing 680 unique Ads data, and I am sending these 680 AdIds to AdGroupAdService to get other data, but AdGroupAdService is providing only 480 records.

I have also tried to retrieve data by sending actual AdIds which are present in $statsArray but not present in $page but no result.

$selector->predicates[] = new Predicate('Id', 'IN', $adIds);



And I have also tried to retrieve data by sending AdGroupId of the particular AdId which are present in $statsArray but not present in $page still no result.


$selector->predicates[] = new Predicate('AdGroupId', 'IN', $adGroupIds);



Please Help me.

1 Expert replyverified_user

Re: AdGroupAdService not providing all Ads - v201406

Top Contributor
# 2
Top Contributor

Hello,

 

There is a dedicated AdWords API forum. This is the link: https://groups.google.com/forum/#!forum/adwords-api

 

I would suggest you to re-post this over that specific forum for more insights.

 

Pankaj