Hi All,
I am writing a script for google adword that will exclude the unnecessary products.
I have automated a task to disable all products whose click value is above 50 but conversion is still 0.
We can get all product whose click value is grater than 50 and conversion value is 0 from 'withCondition' parameter below.
After that it will disable all those prouduct with 'excludeTheProducts' function.
function main() {
var campaignName = 'CAMPAIGN NAME'; //Campaign Name
var adGroupName = 'ADGROUP NAME'; //Ad Group Name
var clickValue ='50'; //Maximum Click Value
var conversionValue='0'; //Minumum Conversion value
var shoppingAdGroup = AdsApp.shoppingAdGroups()
.withCondition("CampaignName = '" + campaignName +
"' and AdGroupName = '" + adGroupName + "'").get().next();
var root = shoppingAdGroup.rootProductGroup();
//Get all product with Greater or equal to the Click value and Less than or equal to Converstion value
var childProductClicksGroups = root.children().withCondition("Clicks >= '"+clickValue+"' and Conversions <= '"+conversionValue+"'").forDateRange('LAST_MONTH').get();
//This will exclude the product
excludeTheProducts(childProductClicksGroups);
}
Now I would like to same process for all products whose 'All Conv. value / cost' (
https://prnt.sc/y0gx27) is less than 1 and Clickvalue is above 50.
But it seems that there is no way of accessing 'All Conv. value / cost' or 'All Conv. Value' in the google ad script.
How do we access those values in ad script?
Thanks