This script helps you keep only the best performing ad variations in your account by removing underperforming ads.
Notes: Replace the following variables with your own values: campaignSelectorStatement, deleteAds, pauseAds, email, minAdsToKeepPerAdGroup, suggestMode, time
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
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
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.
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: