Script to automatically change the target ROAS in TROAS campaign

1,898 views
Skip to first unread message

Siqi Gu

unread,
Nov 20, 2019, 2:25:34 PM11/20/19
to Google Ads Scripts Forum
Hey team,

is there a script that i can upload to adwords so i can scheduled different ROAS goal in TROAS campaign? for example, change TROAS from 5 (original) to 3 in certain dates? and I need to change the target ROAS around 3am ET, that's why i need the scheduled script.

thanks!

Google Ads Scripts Forum Advisor

unread,
Nov 21, 2019, 2:40:51 AM11/21/19
to adwords...@googlegroups.com
Hi,

Thanks for posting your concern.

I am afraid that it is currently not possible in Google Ads scripts to update the bidding of ads so the provided use case is also not possible.

Furthermore, if the bidding strategy that have set in the campaign is Target ROAS, on the product level, Google Ads system is the one that automatically sets bids to help get as much conversion value as possible at the target return on ad spend (ROAS) you set. With this reason, I am afraid that the provided use case is also not possible.

Let me know if you have further questions/clarifications.

Regards,
Ejay
Google Ads Scripts Team

ref:_00D1U1174p._5001UOCpuq:ref

Siqi Gu

unread,
Nov 25, 2019, 10:21:07 AM11/25/19
to Google Ads Scripts Forum
ok thank you Ejay!

To clarify, it's the shopping TROAS campaign. and i only need to change the target ROAS at the campaign level instead of get bids changes at product group. Would it be a way to upload the script to change it?

(i totally understand if we don't have the script here as you mentioned, but I just wanted to provide more detailed info here in case we have a solution)

thanks again for helping me on this!

Google Ads Scripts Forum Advisor

unread,
Nov 25, 2019, 9:04:17 PM11/25/19
to adwords...@googlegroups.com

Hi,

Thanks for the clarification.

I am afraid that there is currently no method in Google Ads scripts that can be used to adjust the bidding at the campaign level.

Please continue to follow our blog to receive updates and new releases. 



Regards,
Ejay
Google Ads Scripts Team



ref:_00D1U1174p._5001UOCpuq:ref

Siqi Gu

unread,
Nov 26, 2019, 9:50:06 AM11/26/19
to Google Ads Scripts Forum
ok thank you Ejay!

Siqi Gu

unread,
Dec 28, 2019, 4:51:18 PM12/28/19
to Google Ads Scripts Forum
Hey Ejay,

I read some articles recently, and wanted to ask you if there is a way to change the TROAS at ad group level?

thanks for your help!

Siqi

Google Ads Scripts Forum Advisor

unread,
Dec 30, 2019, 3:05:02 PM12/30/19
to adwords-scripts+apn2wqcdumcjnrn6...@googlegroups.com, adwords-scripts+apn2wqcdumcjnrn6...@googlegroups.co, adwords...@googlegroups.com
Hi Siqi,

My name is Matt and I work alongside Ejay. 

Bidding strategy can only be set at the campaign level. The strategy type can only be retrieved at the ad group level.

Regards,
Matt

Siqi Gu

unread,
Jan 5, 2020, 4:31:33 PM1/5/20
to Google Ads Scripts Forum
thank you Matt!

Patrick Holt

unread,
Apr 10, 2020, 10:48:08 AM4/10/20
to Google Ads Scripts Forum
I tried using the following script to pull campaign and TROAS targets from a spreadsheet and then have it uploaded to a bulk sheet, which I could then apply to the account. When I try to apply the bulksheet it doesn't give me any errors, but doesn't make the change. If i upload the sheet manually to bulk uploads it updates the TROAS target appropriately. I'm confused why it works when I manually upload the bulksheet vs when I create the bulksheet via script and then apply it manually. 

function main() {
  
  var columns = ["Campaign", "Target ROAS"];
  var upload = AdWordsApp.bulkUploads() .newCsvUpload(columns);
  
  
  var workbook_url = "spreadsheet url";
  var workbook = SpreadsheetApp.openByUrl(workbook_url);
  var sheet = workbook.getSheetByName("Upload");
  var values = sheet.getDataRange() .getValues();
  
  for(i=1; i < values.length; i++){
    var campaign = values[i][0];
    var TARGET_ROAS = values[i][2];
  
    upload.append({
      'Campaign' : campaign,
      'Target ROAS': TARGET_ROAS,
      });
  };
  
  upload.forCampaignManagement();
  upload.preview();

Google Ads Scripts Forum Advisor

unread,
Apr 10, 2020, 3:16:01 PM4/10/20
to adwords-scripts+apn2wqemqqccbluz...@googlegroups.com, adwords...@googlegroups.com
Hi Patrick,

At first glance, there does not appear to be anything wrong with this script. Can you please provide your CID and script name so I can investigate this issue?

Thanks,

Siqi Gu

unread,
Apr 10, 2020, 3:51:29 PM4/10/20
to Google Ads Scripts Forum
Hey Patrick and Matt,

I have two very basic questions here related to the script: 

1. in the for loop, could you help to let me know why it's "var TARGET_ROAS = values[i][2];" instead of "var TARGET_ROAS = values[i][1];"?

2. may i ask what's the troas format in the google sheet? for example, if my goal is 5. should i input 5 or 500%?

thanks,
Siqi 

Google Ads Scripts Forum Advisor

unread,
Apr 10, 2020, 4:29:46 PM4/10/20
to adwords-scripts+apn2wqd1gk0duhja...@googlegroups.com, adwords...@googlegroups.com
Hi Siqi,

Please see my replies to each of your questions:
  1. We do not have access to the spreadsheet that the script references, but it is simply a matter of how their spreadsheet is structured. For example, they may have other columns in the spreadsheet that are not used in this script.
  2. Either format should work for TROAS uploads.
Regards,

Siqi Gu

unread,
Apr 10, 2020, 4:42:22 PM4/10/20
to Google Ads Scripts Forum
Ok thanks Matt! i got the same issue here after run Patrick's script, so I might also need your help after you investigate his account.

Another basic question - will the script work on paused campaign? or i have to use the enabled campaign to test the script?

thanks again,
Siqi

Google Ads Scripts Forum Advisor

unread,
Apr 12, 2020, 10:28:53 PM4/12/20
to adwords...@googlegroups.com
Hi Siqi,

To provide further information on possible reason why the bulk uploads via script did not make any changes. Provided on this guide are all the possible columns and the possible values that you can set for each columns for bulk uploads via script. If you inspect the 'Bid Strategy Type' for the campaign, you will notice that the 'Target ROAS' bidding strategy is not supported and this is the possible reason why the script did not make any changes.


"Another basic question - will the script work on paused campaign? or i have to use the enabled campaign to test the script?"
As for this question, this will not work as well because of the provided reason.

Let me know if you have further clarifications.

Regards,
Ejay

João Monte

unread,
Apr 1, 2025, 1:15:34 PM4/1/25
to Google Ads Scripts Forum

Hello guys, I know this topic may be already closed, but some years had passed.
Can we still do it? Can we do it by Ad Group?
Reply all
Reply to author
Forward
0 new messages