Want to see if the same search query is appearing in different ad groups?


Having the same search query leading to different ad groups can be bad news. The data about that query isn’t all in one place, making it harder to see how it is performing. It also gets in the way of managing bids: if some queries do badly, turning the bids down in one group can mean they just pop up again in a different group that now has the higher bid, continuing to waste your money.

And it can get in the way of relevancy. You might have a beautifully specific message and landing page for [sterilized standardized scientificized owl] but end up with the specific queries going to the +owl keyword with a more generic ad.

Unfortunately, it isn’t that easy to work out when this is happening by eye, but luckily, the tech team here at Brainlabs (my employer) has built a script that finds out when the same query is appearing within different ad groups. It will save a report to a Google Sheet, showing the queries from the last 30 days and the ad groups they appear in. It also shows some metrics, like Impressions and Cost, so you can see where they perform the best.

Running this script and using its awesome power of automation allows you to just drop negative keywords into the ad groups that you don’t want the query leading to, saving you time and improving your AdWords account.

A typical output will look something like this:


To use the script, first make a blank Google Sheet for the report.

Then head over to AdWords to set up a new script. After copying in the code below, you’ll need to make a few choices in the options:

  • Set spreadsheetUrl to the URL of the sheet you’ve just made.
  • If you want to ignore low-traffic queries, set impressionThreshold to a number. The script will only look at queries with more impressions than this threshold.
    • Set to 0 to look at all available queries.
  • Filter the campaigns to check with the two arrays, campaignNameContains and campaignNameDoesNotContain. For example, if campaignNameContains is ["Brand", "Generic"], then only campaigns with names containing “brand” or “generic” are included. If campaignNameDoesNotContain is ["Shopping"], then any campaigns with names containing “shopping” are ignored.
    • This is not case-sensitive.
    • Leave blank, [], to not exclude any campaigns.
    • If you need to put a double quote into campaignNameContains or campaignNameDoesNotContain, put a backslash before it.
  • If ignorePausedCampaigns is true, then the script will only look at currently active campaigns. Set this to false if you want to also check in currently paused campaigns.

The script will always use the first sheet of the spreadsheet for the report, so if you want to run it multiple times, then move the data so it isn’t overwritten.

  • If the script keeps timing out, you could run it multiple times using campaignNameContains and campaignNameDoesNotContain to look at different campaigns on each run.
  • If you have copies of campaigns for different locations, use campaignNameContains to look only at one location at a time. For example, run the script once with campaignNameContains set to [“-USA”] to look at American campaigns, and then run again with campaignNameContains set to [“-UK”] to look at the British versions.

Some opinions expressed in this article may be those of a guest author and not necessarily Search Engine Land. Staff authors are listed here.

About The Author

, Want to see if the same search query is appearing in different ad groups?, #Bizwhiznetwork.com Innovation ΛI

About Skype

Check Also

, 4 Tips For A Successful TikTok, #Bizwhiznetwork.com Innovation ΛI

4 Tips For A Successful TikTok

Processing…Please wait. Search Engine Land » Channel » Social » 4 tips for successful TikTok …

Leave a Reply

Your email address will not be published.

Bizwhiznetwork Consultation