Keyword and Ad Copy Error Checker Script

If you’re a human being, you’ll be aware of the fact that humans make mistakes. Even the very best of humans make blunders sometimes, no matter how hard we try to be perfect. Google Ads is no exception to this rule: out of date promotions, misspellings (is that spelled right?), rookie keyword targeting mistakes – they’re everywhere. Think of this script as the eraser to the proverbial pencil. A PPC proof-reader.

What’s included?

How does the script work?

The script will automatically check for a number of rookie errors like exact match keywords with a plus sign or broad match keywords missing plus signs. (You’re not still using pure broad match, are you?)

It will look for those hugely embarrassing promotional offers from years past which you forgot to update — like the ones from 2013 which I saw when I was conducting an account audit just yesterday. Then, for some more sanitary checks, it will scan your ad text for some common English misspellings and typos.

How do I use it?

To use the script, copy the code below into your Google Ads account and then change the following settings:

  1. spreadsheetUrl is the URL of a Google Sheet, which the results will be copied into. Create a blank spreadsheet and put the URL in here.
  2. Enter into the array campaignNameDoesNotContain a list of phrases contained in campaign names which you would like to exclude. These have to be in quote marks and separated by commas — for example, [“Display,” “Shopping”] to exclude all campaigns with names containing “display” or “shopping.”
    • Leave blank, [], to not exclude any campaigns.
    • This is not case-sensitive.
    • You could use this to avoid looking at Display campaigns, where keywords don’t use BMM.
  3. Enter into the array campaignNameContains a list of phrases contained in campaign names which you would like to include. Like campaignNameDoesNotContain, these should be in quote marks and comma separated: for example [“Brand,” “Generic “] to include only campaigns with names containing “brand” or “generic.”
    • Leave blank, [], to include all campaigns.
    • Again, this is not case-sensitive.
    • If you need to put a double quote into campaignNameContains or campaignNameDoesNotContain, put a backslash before it. For example, if the campaign name is 9” Tablets, you’d enter it as 9” Tablets.
    • If your account is very large and the script keeps timing out, you could try running the script multiple times using campaignNameContains or campaignNameDoesNotContain to look at different campaigns each time.
  4. If ignorePausedCampaigns is true, then the script will only look at currently active campaigns. Set them to false if you want to look at currently paused campaigns.
    • You can use this to check new campaigns before they go live!
  5. If checkKeywords is true, then the script will check your keywords.
  6. If checkAdText is true, then the script will check your text ads.
  7. If checkSpelling is true, then the script will see if some common English misspellings appear in your text ads.
    • If the script times out when you try to run it, you could try setting two of these to false and one to true, so that you do one of the checks at a time.
  8. checkAdsFor is a list of pieces of text used to check your ads (if checkAdText is true). If an ad contains any, it will be logged in the spreadsheet. We’ve suggested the past few years and Easter, but you could remove any you don’t want or add your own — they just have to be in quotation marks and separated by commas.
    • Guess what? This isn’t case-sensitive.
    • Using the power of regular expressions, the script will only check for whole words — if you’re checking for “Easter,” it won’t pick up ads that say “Eastern” or “feaster.” It will pick up “Easter’s.”
    • The script looks at ad text as a whole, rather than line by line. That means that if you put “Black Friday” in checkAdsFor, it will spot if an ad says “Black” at the end of DL1 and “Friday” at the start of DL2.

The Keyword and Ad Copy Error Checker Script code