Operator >= with metrics.conversions

83 views
Skip to first unread message

cv

unread,
Sep 11, 2019, 3:30:39 AM9/11/19
to AdWords API and Google Ads API Forum
Hi,

metrics.converisons is not working with operator >=

I have not found any documentation as well for same.


Thanks,

Google Ads API Forum Advisor Prod

unread,
Sep 11, 2019, 12:54:49 PM9/11/19
to chirag....@gmail.com, adwor...@googlegroups.com
Hi Chirag, 

The operator: >= is not one of the supported operators for metrics.conversions. You may use the valid operators for this operation such as: =, !=, <, >, IN, NOT IN, IS NULL, IS NOT NULL. You will be able to combine the one of more conditions using AND. Could you please give this a try with one of these operators and let us know if you encounter any issues? 

Thanks,
Bharani, Google Ads API Team

ref:_00D1U1174p._5001UHGOI3:ref

cv

unread,
Sep 13, 2019, 2:22:12 AM9/13/19
to AdWords API and Google Ads API Forum
Hi,

This is same error I can see under log.

I have expected the document which operator is supported by which metrics/segments.

How I can have condition >= for conversions?

Thanks,

Google Ads API Forum Advisor Prod

unread,
Sep 13, 2019, 10:47:17 AM9/13/19
to chirag....@gmail.com, adwor...@googlegroups.com
Hello Chirag, 

You will be able to achieve this by combining the conditions using AND. Sample report query is below:

query: "SELECT ad_group_ad_asset_view.performance_label, asset.id, campaign.advertising_channel_sub_type FROM ad_group_ad_asset_view WHERE metrics.conversions > 0 AND metrics.conversions = 0"

Hope this helps!

Mat

unread,
Sep 16, 2019, 9:14:22 AM9/16/19
to AdWords API and Google Ads API Forum
Hi Bharani,

would you mind doublechecking both of your answers in this post?

  1. The op asked about the metric "conversions". Since "conversions" is of type "double", the only supported operators are > and <:
    https://developers.google.com/adwords/api/docs/appendix/reports/keywords-performance-report#conversions
  2. If you combine two expressions in a WHERE clause with "AND", both of them have to be true to yield a result. 
So your suggested code "WHERE metrics.conversions > 0 AND metrics.conversions = 0" is double wrong: "= 0" is not supported with "conversions" and even if it were, the code would always return zero elements.

Regards
Mat

Google Ads API Forum Advisor Prod

unread,
Sep 16, 2019, 9:24:57 AM9/16/19
to m...@keyword-experte.de, adwor...@googlegroups.com
Hi Mat, 

Thank you for the inputs. When using the WHERE clause, one or more conditions can be specified using AND to separate them. However, in this case, this will yield zero results. The workaround for this would be to generate two separate reports one with metrics.conversions > 0 and the other with metrics.conversions = 0 and combine the data results.  

Regards,

cv

unread,
Sep 16, 2019, 9:28:25 AM9/16/19
to AdWords API and Google Ads API Forum
Hello Bharani,

Yes, this could not be good solution to just get >= data by generating 2 reports.

Mat was right, I am not getting any rows with conversions > 0.

Thanks,

Google Ads API Forum Advisor Prod

unread,
Sep 16, 2019, 9:37:09 AM9/16/19
to chirag....@gmail.com, adwor...@googlegroups.com
Hi Chirag, 

I understand your concern. I have already raised a feature request to the team to include support for >= operator. Please keep an eye on our blog for more updates. 

Thanks,

Zweitze

unread,
Sep 16, 2019, 10:51:07 AM9/16/19
to AdWords API and Google Ads API Forum
May I ask what you are trying to achieve?

Note that
metrics.conversions>=0.00
is ALWAYS true, because you cannot have negative conversions. (Well, then there is of course this problem, which is solved for the future - but in the past you may indeed get negative values. But.. it is extremely rare to run into these! Anyway this is the angle I'm interested in.)

Also, did you notice that conversions were given with two digits. Assuming you want (metrics.conversions>=1), do you have problems with:
metrics.conversions>0.99
If so, what problems do you experience?

cv

unread,
Sep 17, 2019, 1:06:56 AM9/17/19
to AdWords API and Google Ads API Forum
Hi Zweitze,

Thanks for the insight.

I am working on project where I need to have Minimum Converisons and View through Conversions criteria for adgroup and campaign.
So when I fetch the data I need to use condition where Converisons >= 5 to achieve the target audience.
But as you mentioned conversions were given with two digits, I cannot achive with converisons > 5.00 and converisons = 5.00.

Can you please add your views for this conditions?


Thanks,

Zweitze

unread,
Sep 17, 2019, 4:18:34 AM9/17/19
to AdWords API and Google Ads API Forum
Well, did you consider conversions > 4.99 ?!
Realize that Google is rounding the results in the response. So, in theory, Google might return a value 4.9928, which will be formatted at 4.99.
If that is a concern, try conversions > 4.999999 - or how many nines you can put in that query.

cv

unread,
Sep 17, 2019, 5:24:14 AM9/17/19
to AdWords API and Google Ads API Forum
Yes,

Than can be consider. will let you know output for the same when I do little bit on this.

Thanks,
Reply all
Reply to author
Forward
0 new messages