Google Ads Scripts and the V8 Runtime

112 views
Skip to first unread message

MA

unread,
Jul 2, 2020, 10:27:44 AM7/2/20
to Google Ads Scripts Forum
Hi, a few posts by the Ads Scripts Team in this forum mention that Google Ads Scripts are based on Apps Scripts and that the language constructs supported are the same:

https://groups.google.com/forum/#!topic/adwords-scripts/WMCQbpcjNg0
https://groups.google.com/forum/#!topic/adwords-scripts/NX5hYa120Tg

In the link referred by the Google Ads Scripts Team (https://developers.google.com/apps-script/guides/services/#basic_javascript_features) it says that Apps Script supports the V8 Javascript runtime and that the "V8 runtime supports modern ECMAScript syntax and features".

However that does not seem to be the case. If I run the following code snippet:

function main() {
  let message
= "Hello World";
}


In Apps Scripts, it works fine. If I run the same snippet on Google Ads Scripts, there is an error message: "Missing ; before statement. (line 2)". Google Ads Scripts is not recognizing the "let" statement.

Why is this not working on Google Ads Scripts? Does V8 engine need to be activated in a particular way so Google Ads Scripts are supported by the V8 runtime?

Google Ads Scripts Forum Advisor

unread,
Jul 2, 2020, 11:16:28 PM7/2/20
to adwords...@googlegroups.com
Hi,

Let me raise this issue to my team and rest assured that we will provide updates here.

Regards,
Ejay
Google Ads Scrips Team

ref:_00D1U1174p._5004Q21B96s:ref

Google Ads Scripts Forum Advisor

unread,
Jul 6, 2020, 1:12:55 PM7/6/20
to adwords...@googlegroups.com
Hello,

Unfortunately, Google Ads scripts do not yet support V8. We're aware of this gap and are planning the work soon. For now, unfortunately, you will have to use old-style JavaScript for Google Ads scripts.

Regards,
Mike, Google Ads Scripts Team

ref:_00D1U1174p._5004Q21B96s:ref

MA

unread,
Jul 8, 2020, 5:35:50 PM7/8/20
to Google Ads Scripts Forum
Thanks for the info. Any estimate when this will become available to Google Ads Scripts?

Also, this means that Google Ads Scripts and Google Apps Scripts are not really running in the same engine as mentioned in the links referenced earlier?

Regards.

Google Ads Scripts Forum Advisor

unread,
Jul 10, 2020, 8:59:10 AM7/10/20
to adwords-scripts+apn2wqfggie1n8te...@googlegroups.com, adwords-scripts+apn2wqfggie1n8te...@googlegroups.co, adwords...@googlegroups.com
Hello,

Unfortunately, I can't provide any estimates about future release dates. My understanding is that Google Ads scripts are just using a previous version of the Apps Scripts engine.
Reply all
Reply to author
Forward
0 new messages