AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

1.5K members online now
1.5K members online now
For questions related to Google Shopping and Merchant Center. Learn to optimize your Shopping ads
Guide Me

Adwords Script Conversion_Value for Shopping Campaigns

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Is it possible to pull out The conversion value for a ProductGroup in a shopping campaign script wrote in javascript? I am currently using this script to pull out the spend and the converted clicks to make bid adjustment in shopping campaigns but i would like to add the Conversion Value field.



function main(){    


var today = new Date()  

var todaynum = today.getDay()   


  if( todaynum !== 0 && todaynum !== 6){     

var productGroups = AdWordsApp.productGroups()    

   .withCondition("Clicks > 20")  


    .withCondition("CampaignName CONTAINS_IGNORE_CASE 'Shopping'")    


while (productGroups.hasNext()) {   

  var productGroup =;  

   var stats = productGroup.getStatsFor("LAST_14_DAYS");    

var cost = stats.getCost();   

  var conversions = stats.getConvertedClicks();   

  var CPO = cost / conversions;  

   var CPC= stats.getAverageCpc();   

  var maxCPC = productGroup.getMaxCpc();    

var clicks = stats.getClicks();    


      if(conversions > 0){     


    if(CPO > 25 && CPC < maxCPC){     



   if(CPO < 10 && CPC > 0.8*maxCPC){ 



} else {  

   if(clicks > 100){  


    }    } } } }

1 Expert replyverified_user

Re: Adwords Script Conversion_Value for Shopping Campaigns

Top Contributor
# 2
Top Contributor

there are getClickConversionRate and getConvertedClicks;
otherwise, conversionvalue is exposed in the report methods.

otherwise, the adwords-scripts forum is currently here:!forum/adwords-scripts