3K members online now
3K members online now
Improve your AdWords performance and boost your ROI, CTR, and Quality Score
Guide Me

Google Shopping Script Adjusting Bids Based on ROAS From Price

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello, Everyone! Been learning a lot since joining the community much appreciated to the contributors!


I've been working on a script based off of what I found that would account make adjustments based on the margin of the product price. Currently, I have it based on the conversion pricing which is one way of adjusting bids, but can be misleading if the product has outliers from conversions.


Is there a way to change a script like the one below to account for the ROAS based on the pricing on the product individually to ensure that we do not overspend per product? I added in the .10 to also have the script take account for the margin of the product currently, but would prefer to have it calculate based off of the product's individual pricing to make sure we don't jack up the bids higher than profitable.


function main() {
  var targetCPA = 20;

  var productGroupSelector = AdWordsApp
  .withCondition("Impressions > 100")
  .orderBy("Clicks DESC");
  var productGroupIterator = productGroupSelector.get();
  while (productGroupIterator.hasNext()) {
    var productGroup =;
    var conversionRate = productGroup.getStatsFor("LAST_MONTH").getConversionRate();
    productGroup.setMaxCpc(targetCPA * conversionRate * .10)
1 Expert replyverified_user

Re: Google Shopping Script Adjusting Bids Based on ROAS From Price

Top Contributor
# 2
Top Contributor

Hi @Apocalypse7 as far as I'm aware it's not currently possible to access the product value through scripts, so you'd need a different solution.  Off the top of my head I'd suggest two possible approaches:


#1 - Organise your Shopping Campaigns/Groups so that you have products of a similar value in the same Groups.  You could then run the script against each group picking up a different ROAS as appropriate.


#2 - Use Custom Columns in your shopping feed (these can be read by Scripts) to include an ROAS target in the feed itself.


It's probably easier to go down the second option if you already have a structure that works for you.  Bear in mind you may need to step down through the product group structure to reach individual item ids...



AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits