Tag Archives: Optimization

Remove Underperforming Ads


This script helps you keep only the best performing ad variations in your account by removing underperforming ads. Google can automatically show your best performing ads more frequently but it's always a good idea to prune your account and remove ads that are not performing well. Ideally you should always have at least 2 ads running so that you can test which variation is better.

Example Use Cases

  • Reduce all ad groups in an account down to the 2 best active ad texts before doing new ad variation testing
  • Clean up underperforming ads in an account you just started to manage
  • Run a monthly cleanup of all ad variation experiments you started at the beginning of the month

Settings and Customizations

Replace the following variables with your own values: campaignSelectorStatement, deleteAds, pauseAds, email, minAdsToKeepPerAdGroup, suggestMode, time

campaignSelectorStatement (required)

The campaignSelectorStatement tells the script on which campaigns to operate. It uses the syntax from AdWords Scripts for .withCondition(condition)

  • For example, to operate on all campaigns in an account use: CampaignName CONTAINS_IGNORE_CASE ''
  • To work only on the campaign named "Campaign #1" use: CampaignName = 'Campaign #1'

deleteAds and pauseAds (required)

These variables tell the script if you want to delete or pause the lowest performing ads. Set one to a value of 1 and the other to a value of 0

minAdsToKeepPerAdGroup  (required)

This variable tells the script the minimum number of ads to keep in each ad group. If you set this value to 2, then the script will only pause or delete ads if there are at least 3 ads in the ad group. We recommend starting with a value of 2

suggestMode  (required)

This variable tells the script if it should make changes in the account or not. If set to 1, ads will be paused or deleted based on your specifications. If set to 0, then the script's output log will include an overview of its recommendations but no changes will be made. We recommend first running the script in suggestMode and only turning this off after you've read through the recommendations and are satisfied that it is making sensible suggestions.

time  (required)

This variable tells the script the time range of data to use to make its decisions. This should be long enough to have at least 100 impressions per ad group and 25 impressions per ad text but not so long that the time range spans a period of time when a lot of ad text changes were made in the account. We recommend using a value of last 14 days or last 30 days.

Allowed values are one of the following as specified in the AdWords Scripts documentation for selecting time ranges:

  • LAST_14_DAYS
  • LAST_30_DAYS


Under The Hood

This script looks through all the active text ads in an account or a set of campaigns and suggests the ones that should be removed based on what share of impressions Google's algorithm is giving each ad. Ads that get a disproportionally low percentage of impressions are Google's way of saying the ads are not optimal so we remove these by pausing or deleting them. Because we don't want to remove an ad that Google doesn't like if it's a big contributor to your clicks or conversions, the script won't suggest any of these for removal.


The script cannot see when ads were paused or activated so it can't do a perfect apples-to-apples comparison. It assumes that all ads in an ad group were active for the same amount of time. This means that if you run the script using a 14-day lookback window and there is an ad in the ad group that you created yesterday, that ad will have a very low 'percent served' value purely because it was only able to compete with the other ads for 1 out of 14 days. In this case, the script would incorrectly believe this was a bad ad and remove it. To avoid this situation, only run the script on ad groups that have not had any ad changes during the period of time used for the analysis.

Download Script

Landing Page Watch Dog


Automatically check your AdWords account for landing pages that are broken, either because they don't load, contain 404 server errors or contain text that indicates a problem of another sort. This script generates a spreadsheet with a list of all the potentially broken landing page URLs used by ads or keywords in your account and allows you to optionally delete or pause any of these items.

Get a spreadsheet that shows all your landing pages that have potential  problems.
Get a spreadsheet that shows all your landing pages that have potential

Example Use Cases

  • Retailers can pause ads when a product goes out of stock
  • Pause ads for products that have a low review score based on user comments
  • Delete ads that lead to broken landing pages

Settings and Customizations


This setting tells the script if you want to check only keyword destination URLs, only ad destination URLs or all destination URLs. Valid options are:

  • all
  • kw
  • ad


This setting lets you tell the script to only evaluate a portion of your account. It uses the AdWords Script syntax for the .withCondition clause. If you don't know what that means, don't worry, these examples should make it clear:

  • To select everything in the account, you can use the line "CampaignName CONTAINS ''" and that's what the script is already set to use if you don't change it.
  • To select all the destination URLs for campaigns that include the word 'search', you could use the line "CampaignName CONTAINS_IGNORE_CASE 'search'"


This tells the script what text to search for on your landing page. For example, you could tell it to look for the phrase "out of stock". If you want to search for multiple phrases, put a comma between them but do NOT add a space after the comma, for example "out of stock,low inventory" tells the script to look for the phrase "out of stock" or "low inventory". When at least 1 of these phrases is matched, the script wil report this and delete or pause the item as per your request. The search is case insensitive so use lower case for this setting.


Set this setting to 1 so that the script will just report about problems. If set to 1, the script will NOT try to delete or pause anything in the account. We recommend you set this to 1 the first few times to make sure the script is finding only the items you want before you start to delete or pause these items automatically.


This setting tells the script to disable any item it finds that has a destination URL that is broken or that contains one of the phrases you are looking for on the page. When set to 1, it disables what it finds.


This setting does the opposite of the setting 'disable'. It enables any items that have a destination URL where the phrases you are searching for are found. This can be useful to automatically re-enable ads when a product comes back into stock. Set this to 1 to enable items. Note that you should never set both 'disable' and 'enable' to 1.


This setting tells the script the URL of the Google Spreadsheet where it should store its findings. You can either enter the URL or put in the text "NEW" to have the script automatically create a new spreadsheet every time it runs.


This setting is where you tell the script what you call the account. It's just used for notifications and for naming the spreadsheet so that you can more easily find what you're looking for. So go ahead and name it something that makes sense to you but avoid special characters like slashes, dollar signs and anything else you wouldn't normally use for file names.

Under The Hood

This script goes through every item that has a destination URL in the specified portion of your account and checks if the page loads correctly without a 404 error. If the page does not load correctly, it pauses the item or just notifies you depending on your settings. It also loads the content of the landing page and checks whether it contains the specified phrases of text. If the text is found, it enables or disables the item or notifies you based on your settings.

This script will only pause or unpause items, it cannot delete anything.

The script is able to follow redirects in your destination URLs but if you want to test whether your redirects are compatible, take a look at our FAQs for instructions.

Download Script


Mcc Version of Landing Page Watch Dog:

The MCC (My client center accounts) version of this AdWords script checks broken landing pages runs for all or specific child accounts. It has the same functionality as mentioned above.

Additional Settings and Customization:

In addition to the above settings, you can customise it to choose the child accounts you want to run it for under your MCC account.


This setting tells the script the number of accounts you want to run this script for. When set to default i.e. blank, the script checks the broken landing pages for all the child accounts under the AdWords MCC account. To run for specific child accounts, you can add the AdWords account id of those child accounts separated by a comma.

Download Mcc Script

Tip: AdWords places a limit of 30 minutes on MCC scripts as well. If you have too many child accounts in the MCC then create multiple versions of this script in the MCC account and pick a different set of child accounts for each.