Understanding The Basics Of Adword Scripts

By Terrance G Kern on November 1, 2018

AdWords Scripts

Google Adwords Scripts

The implementation of AdWords scripts into your campaigns should not be challenging. After all, AdWords scripts are meant to ease or automate your PPC reporting and performance. Here, we will look at what AdWords scripts are, how AdWords scripts work, how you can set them up, and several popular scripts used by digital marketers.

AdWords Scripts- What are They?

In simple terms, AdWords scripts refer to JavaScript code snippets meant to help you control your campaigns better. You can use these scripts for automating internal functions in your AdWords account. They can as well interact with external data.

What Roles do AdWords Scripts Play?

  • Automating and optimizing PPC campaigns
  • Bid management
  • Split testing
  • Avoiding repetition in reporting
  • Improved reporting

On top of their beneficial roles, AdWords scripts are amazingly customizable.

Why should you use AdWords Scripts?

Time-saving– AdWords scripts automate tedious processes in PPC account maintenance, thus helping you put more focus on the optimization of actual performance.

Catching smaller issues– With the lots of data there is to comb on any given PPC campaign, you might end up missing a chance for building a new ad group, or even fail to note low performing keywords. AdWords scripts capture smaller opportunities or issues you could have missed. AdWords scripts’ useful automation will also help you optimize AdWords optimization routine.

How can you set up AdWords Scripts?

If you have no coding background, scripts can be quite intimidating at first. Fortunately, there are numerous pre-built scripts available to the public if you intend to take up the plug-and-chug method. In our experience though, some bit of customization will do you good, even when using the pre-built scripts. To achieve success in this, you need to understand the following elements.


  • Functions


The function is the first part of the script code that gets things started, and you will always require one as you use AdWords scripts. It looks like:

Function main (  ) {code to execute}


  • Variables


Expressed as “var,” variables refer to data storing containers that help you in the customization of your campaigns. Each variable ought to correspond to specific entities and objects in your AdWords account.


  • Objects


SpreadsheetApp, AdWordsApp, UrlFetchApp, and MccApp are the only types of Google Objects in AdWords. As a starter, you will most likely use AdWordsApp for your script’s objects. This directs the script to look for the data you want in AdWords.


  • Entities


There are a few distinct entities within the AdwordsApp object. You can choose from the basic account structure (account, campaign, keywords, ad groups), or Labels, Ad Params, Budgets, Ad Schedules, and targeting.


  • Selectors


Selectors are fillers for data your script will pull from your AdWords account. If your variable is keywords, for instance, your selectors will assist in filtering the keywords referenced by the script. You can use more than one selector to progressively refine the data you are looking for.


  • Methods


Methods are commands in your code. Based on the action type you want to automate, this can vary from “Get,” “Add,” “Set,” and so on.


  • Iterators


You use iterators to keep the script firing. You can use the next ( ) and hasNext ( ) Iterator to set up a loop that continues firing so long as your script continues to return valid data.

Types of AdWords Scripts

There are several different scripts, and each has its unique shape and size. Their differences are evident in automating, reporting, and adjusting different aspects of your AdWords account. All of these scripts fall under one of the types below.

  • Bid Modifiers
  • Bidding and Budgets
  • Third-Party Data
  • Pausing and Deleting
  • Tools
  • Keywords
  • Reporting
  • Alerts
  • Automating Maintenance
  • Labeling
  • Seasonal Adjustments
  • Ad Text
  • Tracking
  • Shopping Campaigns
  • Google Display Network

Based on how elaborate your account setup is, and the number of campaigns you are managing, you could lean on more and different scripts than others. However, some are more popular, and as a result, used by many digital marketers. These include:


  • Quality Score Tracker


This tool tracks the Quality Score (QS) for all your keywords and enables you to get some historical analysis. You can get this script customized with the particular selectors you intend to use.


  • 24/7 Bidding


While AdWords has only 6 default bidding times to choose from, 24/7 helps you customize bids by the hour.


  • “0” Impressions Pause


This pauses any ads that run for keywords that generate zero impressions automatically. This is a good way to eliminate the worst performance from any ad group before they start to generate useless clicks and traffic.


  • Broken URLs Report


A broken URL comes in when you delete a page from a domain or change some page’s URL and forget to adjust the rest of the SEM account. In such a case, this script will send you a report of broken links for you to update before they cost you valuable traffic.


  • Heat Maps


These tools help in the visual representations of a user’s search behavior. They show significant differences in CTR during specific hours of the day.


  • Link Checker Script


The purpose of this script is going through your account to look for broken links. It particularly checks out for ads that return broken link 404s


  • N-Gram Script


N-Gram script is good for growing and optimizing Single Keyword Ad Groups (SKAGs). SKAGs are designed for creating relevant ads with better CTR, CPC, and Quality Score. This script takes all search queries within a particular time frame and enables you to extract 1,2, and 3-word strings within that account to aid in negative keywords and new creation of SKAG. This script can save much of your time especially if you are handling many keywords or search terms.


  • Ad Spend Report Script


This script sends you recurring emails within an account update on different KPLs including conversions, ad spend, CPA, Current daily speed, and recommended daily script. This is a good way to know how your account is performing before going into analytics. If you handle multiple clients, Ad Spend Report script will give you a brief overview prior to deciding on the account you should address first.


  • Bid Adjustment Script


This script has one script for increasing bids, and another for decreasing bids. It will be useful to you if you consistently want to be on the optimization edge. With it, your account automatically adjusts bids and keywords that fit through the custom filler.  


  • Ad Copy A/B Test Script


This script goes through campaigns you are running and tags them “winner” or “loser” based on their performance.


  • Low CTR Ad Pausing Script


When dealing with many ads, you might not be able to keep track of all. This script automatically pauses the lowest performing ad in your campaign provided there is at least another variant. It will help you pair your account down and clean of worst performers.


  • Declining Ad Groups Report Script


This script produces a spreadsheet which populates with any ad groups which are dropping in performance.


  • Changes in CTR Script


This script populates a google sheet for you to historically track the CTR of specific ads. It helps you track changes in user behavior relating to your ad, and gives you new insights on the search terms you should target.


  • Bid by Weather Script


This script calculates weather conditions for every location regarding some rules. It then fires your bid multiplier increasing the bids of specific locations based on your defined rules.

Optimize Your Reporting for an Optimized Performance!

Now you know the commonly used terms in AdWords scripts and the popularly pre-built scripts used by digital marketers. Keep it in mind though that scripts are just tools like any other, and can be very effective when used right.


Comments are closed.

FREE Website Analysis

I have read and agree to the Terms of USE