Blog  - październik 12, 2020

Why should you get more familiar with Google Adds scripts? 4 min czytania

Automation has become an inseparable part of our lives. When it comes to SEM specialists (or wider - PPC specialists), automation of reporting or setting rates for keywords is a basic element of optimizing campaigns and increasing its effectiveness. In the digital marketing world, automation of any kind of process (not only operations at ad accounts) is currently a crucial element of day to day work. 

What can Google Ads automize? 

Google Ads system enables to automize almost everything, that is connected to work on campaigns and their effectiveness. From the simplest automatic rules that enable showing and stopping ads,  adjusting rates, or budget controlling; through more technically advanced Google Ads scripts (which require basic development knowledge); ending with Google Ads API that are dedicated to developers. 

Each of those tools has a different purpose. For stopping campaigns with defined time periods you can go with an automatic rule. But when you want to stop the campaign with a specific scheme of naming that is based on a few accounts, you might need a script that was turned on from the manager account. This post will be an introduction to using Google Ads scripts and will help you to create your own, as well as find out more about ready-to-go solutions.

What are Google Ads scripts? 

As the name stands, Google Ads scripts are nothing more than a code written in the JavaScript language (and/or in AdWords Query Language that is based on SQL). and prepared in the dedicated IDE environment (Integrated Development Environment) based on the browser working. To turn on our script all we need to do is have an access to Google Ads that enables us to make changes on the account. Scripts can be turned on both from the client's account, as well as from the MCC manager’s account. It is important, because some of the scripts, to be fully active, need to be turned on a few times. Mentioned IDE helps with the highlighting syntax, auto-filling and showing the preview of how our code will work. Before turning on the script we need to make the authorization. As users of defined Google Ads account we agreed this way to making changes by the script on our behalf. 

Almost every time, based on what results we want to achieve, we also need to set the frequency of doing the scripts. We can choose between single turning on, every hour, week or month. 

How does the authorization process of Google Ads work?

It’s simple and very intuitive:

  1. We log into our Google Ads account or MCC account;
  2. We click into “Tools and settings” icon and next “Scripts” button in the “All activities”;
  3. We click into + icon (with the summary sign) that will enable us creating or paste new scrip;
  4. We now have an access to code editor, which contains “main function” - essential element of every Google Ads script; 
  5. In the curly brackets we write or paste our script, that will be now the JavaScript instruction.

Writing our own or using pre-made scripts in Google Ads, and understanding what those scripts are doing requires a basic knowledge of developing in JavaScript (or, possibly in AWQL language). Basic terms that we should get familiar with are:

  • variable
  • sequence of signs
  • argument
  • item
  • method
  • all the “entities” - items typical for Google Ads: accout, ad customizer, ad groups
  • selectors - filters of data that our script will take implement from Google Ads account
  • iterators - loops that make script do its job

In the internet you can find a lot of materials about the terms above used in the context of Google Ads. We also recommend checking the documentation of Google Ads ( ).

Configuration of scripts in Google Ads

When we are using ready-to-go scripts, the configuration is mostly about changing a couple of things in the code, like naming variables dedicated to:

  • e-mail addresses assigned to the administration purposes
  • links for Google Spreadsheet documents that are supposed to be filled with data from the report or from which we can download information essential to the script
  • additional parameters based on what specific functions of scripts is working (for example ID of GMC account)
  • API Key - unique IDs that are made to confirm the user that is related to the external applications (outside of Google Ads system), like for example weather apps.

The creators of scripts often highlight those parts of the code that must be configured. If we want to use ready-to-go solutions and we are not sure which changes on the account the script will make, the best way is to ask a developer for help. What we need to do before turning on the script is to use the mentioned before preview option (debugging of the script), that is available in the IDE. We need to remember that we cannot undo the changes that we made with Google Ads script. Ready-to-go scripts are also available in Google itself: ( ).

Google is the best known source of ready-to-go solutions, but the rule of using preview before turning on the script applies here as well. Some of the scripts might be outdated, which means that it does not consider the changes in the Google Ads ecosystem. For example, it applies to “smart” campaigns in which some populars scripts are not working. Luckily, Google developers are trying to keep up with the changes.

What Google Ads scripts are useful for SEM? 

There are a lot of ready-to-go scripts that will automate SEM work. Its analysis is a great source of knowledge which we can use while creating our own solutions. We can distinguish a couple types of scripts:

  • reporting data from Google Ads account(s)
  • implementing changes (in the campaigns, groups of ads, ads)
  • notifications

The most popular are those that will report of notify:

Why should you start using Google Ads scripts?

The biggest advantage of using Google Ads scripts is time saving. Tools that help us automise processes are very valuable. All saved time we can spend on optimizing actual campaigns or verify current strategy. Another reason is that while using Google Ads scripts we are constantly eliminating human mistakes in the campaign managing process. Well-written and double-checked Google Ads script will minimize the possibility of making mistakes and will generate the effect that we want to achieve.

What is more, we can scale using scripts. Once written script can be easily used on other accounts and the code can be rebuilt and developed. Knowing how many ready-to-go scripts we can find in Google Ads, a perfect (or almost perfect) solution for us can be found very fast.