Google Ads

AWQL Example: Pause One-Word Keywords

Automated scripts are the best and easiest way to comply with Google Ad Grants compliance requirements. Use this AWQL example to keep yourself from receiving unexpected non-compliance reports in your inbox. Especially if you aren’t the only one adding terms to campaigns, or have many different campaigns to monitor.

In Using AdWords Query Language (AWQL) for Google Grants Compliance, we detailed an AWQL script. That script finds any terms whose Quality Score falls below the required 3/10. Now we’ll look at another requirement of the Grants program – no one-word keywords. One-word keywords are too generic. Broad match (or broad match modified) amplifies this. Therefore, you are required to have at least two words in every term.

The AWQL example script below generates a list of non-compliant keywords. You can then pause the single-word keyword. By not automatically pausing them, you get an opportunity to brainstorm modifiers. Then replace the offending term.

function main(){
 	var singleWordKeywords = AdWordsApp.keywords()
	.withCondition("Text DOES_NOT_CONTAIN ' '")
	.withCondition("Status = ENABLED")
	.withCondition("CampaignStatus = ENABLED")
	.withCondition("AdGroupStatus = ENABLED")

	while (singleWordKeywords.hasNext()){
		var kw = singleWordKeywords.next();
		Logger.log(kw.getCampaign().getName() + " - " + kw.getAdGroup().getName() + ": \"" + kw.getText() + "\" " + kw.getQualityScore() + "/10");

This finds any keyword that does not contain a space, which signifies that it is just one word. It then ensures the keyword, ad group, and campaign are all enabled before adding it to the list. The console log will output a formatted list of keywords that need your attention.

To use this AWQL example:

  1. Navigate in the header to Tools and Settings > Bulk Actions > Scripts
  2. Hit the blue circle with a + sign in it to add a new script
  3. Authorize the script to run on your account
  4. Give it a name and paste the code above into the body. Save it.
  5. In the Frequency column, choose how often you’d like to run the script. Anywhere between once per day or once per week is sufficient.

If you’re running into any trouble getting the script to work contact us. A little bit of automation goes a long way.