Predicate not working correctly

250 views
Skip to first unread message

Bon S

unread,
Jun 8, 2015, 5:46:06 PM6/8/15
to adwor...@googlegroups.com

Hi , 

I am trying to download CAMPAIGN_PERFORMANCE_REPORT with Predicate set as follows:

__rdxml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDefinition xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502"><ns2:selector><ns2:fields>CampaignName</ns2:fields><ns2:fields>Clicks</ns2:fields><ns2:fields>Impressions</ns2:fields><ns2:fields>Ctr</ns2:fields><ns2:fields>AverageCpc</ns2:fields><ns2:predicates><ns2:field>SearchImpressionShare</ns2:field><ns2:operator>GREATER_THAN</ns2:operator><ns2:values>47</ns2:values></ns2:predicates><ns2:dateRange><ns2:min>20150309</ns2:min><ns2:max>20150607</ns2:max></ns2:dateRange></ns2:selector><ns2:reportName>CAMPAIGN_PERFORMANCE_REPORT #1433786 </ns2:reportName><ns2:reportType>CAMPAIGN_PERFORMANCE_REPORT</ns2:reportType><ns2:dateRangeType>CUSTOM_DATE</ns2:dateRangeType><ns2:downloadFormat>CSV</ns2:downloadFormat><ns2:includeZeroImpressions>true</ns2:includeZeroImpressions></reportDefinition>

However, the predicate is not being applied it seems (The report contains rows that do not even meet the criteria). The same Predicate works fine when I use "Clicks" or "Impressions" instead of "SearchImpressionShare". 

My observation is that it does not work when the field is of type Double (for example , SearchImpressionShare , AveragePosition, Ctr etc.) but works for field(s) of type Long. Am I missing something here ? The link here https://developers.google.com/adwords/api/docs/appendix/reports/campaign-performance-report says the fields I have tried with are all filterable. 

Josh Radcliff (AdWords API Team)

unread,
Jun 9, 2015, 11:21:20 AM6/9/15
to adwor...@googlegroups.com, b...@digitalbrandmine.com
Hi,

That field is actually a percentage, so if you want rows where the percentage is > 47%, you should filter on SearchImpressionShare GREATER_THAN 0.47. Please give that a try.

If that doesn't resolve the problem, could you provide the list of CampaignId values for which you are seeing incorrect behavior?

Thanks,
Josh, AdWords API Team

Bon S

unread,
Jun 9, 2015, 12:48:50 PM6/9/15
to adwor...@googlegroups.com, b...@digitalbrandmine.com
Thanks, Josh ! It works the way you suggested. 

Chirag

unread,
Jan 5, 2016, 12:18:40 AM1/5/16
to AdWords API Forum
Hi Team,

I am also Not able to use predicate GREATER_THAN with convertedclicks under ADGROUP_PERFORMANCE_REPORT.

$selector->predicates[] = new Predicate('ConvertedClicks', 'GREATER_THAN', array('0'));
OR
$selector->predicates[] = new Predicate('ConvertedClicks', 'GREATER_THAN', '0');

Getting error : "An error has occurred: Report download failed. Underlying errors are Type = 'ReportDownloadError.INVALID_REPORT_DEFINITION_XML', Trigger = 'Invalid ReportDefinition Xml: cvc-complex-type.2.4.b: The content of element 'predicates' is not complete. One of '{"https://adwords.google.com/api/adwords/cm/v201509":values}' is expected.', FieldPath = ''.

Can anyone suggest me solution?

Thanks,

Josh Radcliff (AdWords API Team)

unread,
Jan 5, 2016, 9:42:34 AM1/5/16
to AdWords API Forum
Hi,

It looks like there may be an issue with the PHP library when the values portion of the predicate is array('0'). Could you try the following equivalent predicate instead?

$selector->predicates[] = new Predicate('ConvertedClicks', 'GREATER_THAN_EQUALS', array('1'));

Thanks,
Josh, AdWords API Team

Chirag

unread,
Jan 8, 2016, 1:17:19 AM1/8/16
to AdWords API Forum
Hi Josh,

Yes, I have use GREATER_THAN_EQUALS predicate after not getting successful response.
But this needs to be correct asap.

Thanks,

Josh Radcliff (AdWords API Team)

unread,
Jan 8, 2016, 8:49:50 AM1/8/16
to AdWords API Forum
Hi,

Glad to hear that the work around worked for you. I've raised this issue with the PHP client library owners and they are looking into it.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages