Account Structure Checker

This script checks whether every exact keyword in an exact campaign has a corresponding BMM keyword in the corresponding BMM campaign (and so on for phrase campaigns etc).

If you’re struggling to stay on top of keyword relevance, here’s a script to help you up your match type game.

Our best practice is to separate campaigns by match type. For each client or product, we like to set up two similar campaigns that contain identical keywords but with different match types — one with exact match and one with broad match modifier (BMM).

The exact keywords are applied as negatives in the broad campaign, so that search terms that match exactly will be filtered through to the exact keyword.

If you use a similar kind of account structure but need a helping hand to make sure you’re being consistent, this script is for you! 

What the script does

This script helps you check whether every exact keyword in an exact campaign has a corresponding BMM keyword in the corresponding broad campaign, a phrase keyword in the corresponding phrase campaign and so on. It should work quite flexibly with your account structure, whatever your best practice might be.

It makes it easier to filter for and make changes to certain campaigns, ad groups or keywords, and facilitates comparing similar campaign groups. And don’t forget to always use a consistent naming system — aside from saving yourself a headache in future, it makes setting up scripts like this one a bit easier.

How to use the script

In your account in the Google Ads interface, go to Bulk Actions, choose Scripts, then make a new one and paste in the script at the end of this article.

There are a few settings for you to play around with based on your preferences:

  • spreadsheetUrl lets you input the URL of the Google Sheet you want the results to appear in
  • Two filters for campaign names to be included or excluded
    • Use campaignNameContains if you only want to look at campaigns that contain a certain word or set of words in their name
    • Use campaignNameDoesNotContain for the script to exclude certain campaigns
  • You can choose to ignore or include paused campaigns with checkPausedCampaigns
  • Specify the match types you are interested in looking for in the keywordMatchTypes variable

The code