Automated advertising with Google Ads Script

When hearing about automated advertising in Google Ads, it refers to automated bidding, dynamic keyword ads as well as automated rules for most of us.

Although the tools mentioned above are highly useful, they are not the end-all-be-all of automation in Google Ads. One way to take automation to the next level is to do it by utilizing scripts in advertising. 

Google Ads scripts are small JavaScript code snippets that allow certain functions to be automatized on Google Ads account. What is more, external data can be utilized in advertisement optimization thanks to these snippets.

The possibilities of scripts are nearly endless. In fact, what makes them so advantageous is that they are highly customizable, therefore making them highly appealing. 

Most often scripts are used for automating and optimizing following aspects:

  • Bidding offers
  • Starting and pausing advertisements
  • Changes to budget
  • Automated messages
  • Reporting
  • Utilizing external data

How are scripts beneficial?

Google Ads Scripts are most beneficial on major ad accounts (these include major eCommerce sites) and on accounts where a great chunk of time is spent on ad optimization.

An eCommerce site that advertises thousands or tens of thousands products on its ad account is able to utilize scripts for instance by pausing the ads whenever the item is out of stock.

Furthermore, biddings can be optimized with scripts in various ways. One way to do this is to set the script to raise the bid automatically in situations where its rank falls under a score defined. On the opposite, bids can also be lowered in cases where the conversion price gets too high and where advertising becomes unprofitable.

Setting up Google Ads scripts

Setting up Google Ads scripts has been made relatively easy, but it must be said that creating scripts requires some knowledge of coding.

Scripts can be found via this path on the ads account: tools > bulk actions > scripts.You can add JavaScript code by entering it to the opening window and saving it. If you are keen on learning how to create your own scripts then it is a good idea to start with a Guide provided by Google.


You can add JavaScript code by entering it to the opening window and saving it. If you are keen on learning how to create your own scripts then it is a good idea to start with a Guide provided by Google.

Example – change bidding based on the weather

The demand for certain products and services varies greatly depending on the weather. A classic example of this is the ice cream example: users are more likely to search information regarding ice creams on a hot, sunny day compared to a cold and rainy day. Same applies for various outdoor activities. 

Although the advertising entity is, in practice, able to raise their pricing when the weather is good, it requires a great deal of manual work from the entity. With Google Ads Scripts this can be done automatically in a few minutes.

Firstly, the script searches for the campaigns and their geo locations on Google. Then it searches for weather information on OpenWeatherMapAPI. The script knows how to set the bid based on the combination of these two factors.

Are you looking for a reliable partner in marketing to improve advertising?

Daniliants Ventures has expertise in Google Ads for companies of various sizes operating in various fields. Our focus is on achieving results and therefore we base the development of advertising on data and analytics. Contact us now!