SELECT ad_group_ad.ad.id, ad_group_ad.ad.name, metrics.all_conversions, metrics.conversions, metrics.cost_micros, metrics.average_cpc, metrics.ctr FROM ad_group_ad
![]() |
Google Ads Scripts Team |
Hi,
Upon checking, I would recommend you approach this based on our team's previous response which is by building an ad_group_ad report <https://developers.google.com/google-ads/scripts/docs/features/reports#report_example> and including the metrics as well as filters for the final conditions you've mentioned. Kindly utilize it's interactive query builder <https://developers.google.com/google-ads/api/fields/v14/ad_group_ad_query_builder> for ease in building the report query. You can include them within the WHERE clause to filter on the conversion action ClickMagick - BeginCheckout as well as if their cost is greater than 30 so as to check if the ads meet the conditions. You can include the following fields:
Once you've retrieved these ads, you can store the value for ad_group_ad.ad.id in a variable and input it within the withCondition() method of an AdSelector <https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_adselector>, and then you can use the pause() method. As an aside, it appears that conversion actions do not have levels, such that once you've accessed them using the specific entity's report type, it should be associated with the said entity.
Let us know if you have any clarifications. If this does not work for you, then kindly provide the step-by-step procedure, use-case or what you're aiming for with your script in bullet form so we're able to assist you further.