Brainlab’s Search Query Mining for N-gram Analysis (Updated) for new script environment

Back in 2015, the guys at Brainlabs created a very popular script that allows you to analyze n-grams in your search term data.

An n-gram is a phrase made of n words: a 1-gram is a single word, a 2-gram is a phrase made of two words, and so on. For example, “this four word phrase” contains three 2-grams (“this four,” “four word,” “word phrase”) and two 3-grams (“this four-word” and “four word phrase”).

The script adds up the clicks, impressions, cost, converted clicks and conversion value of each query containing the n-grams — and calculates the click-through rate, cost per click, conversion rate, CPA and value/cost — so you can see their impact.

If the performance is good, you might want to make new ad groups around the n-gram; if the performance is bad, you might want to exclude the n-gram as a negative phrase-match keyword.

If you’re using the Google Ads n-gram script (aka ‘Search Query Mining Tool’) you may have noticed it’s not working in the new Google Ads scripts experience.

It throws an error like:

InputError: shared_criterion.keyword.text || shared_criterion.placement.url || etc.

The issue is caused by an AWQL query that is not compatible with the new script environment.

To fix the issue I’ve updated the script so that it now uses GAQL to retrieve the data.

For instructions on how to use the script, please visit the original post at SearchEngineLand .

Here’s the updated code:

Continue reading “Brainlab’s Search Query Mining for N-gram Analysis (Updated) for new script environment”

Google Ads Script – “Past Violations” Alert

Google continues to surprise me.

Today was the first time I encountered an ad that was disapproved for “Past violations”.

Here’s how Google describes these:


Google continuously re-reviews ads to ensure they conform with our policies. During the standard re-review process, our system may identify disapproved ads that no longer violate our policies. If your ad was disapproved for an extended period of time and our enforcement system later decides that the policy no longer applies, we may keep the ad disapproved and classify the ad as “Past Violation”.  We do this to prevent you from unintentionally exhausting spend on old ads. 

Fan-freaking-tastic. Google acknowledges that the ad had been disapproved for no legit reason in the past, and now still doesn’t show my ad.
Also, I did not see an alert or notification of any kind for this type of disapproval…

Here’s the thing:
Unless you check for these kinds of disapprovals yourself and take action, these ads will get zero impressions.

How to fix?

Continue reading “Google Ads Script – “Past Violations” Alert”

Google Ads Script – Monthly Budget Target Email Alert

Do you manage accounts that have a monthly budget target?

Many of us do.

And many of the questions that land in my inbox these days are about old Google Ads scripts for budget management that don’t work anymore.

Here’s the issue:
Most of the old scripts use campaign selectors to aggregate spend over the different campaigns in the account. These don’t work for the new campaign types!

Local, Discovery and Performance Max campaign cost data is not accessible via campaign selectors.

This means that, unknowingly to you, your account may be overspending your monthly budget.  Or even worse, your client’s budget. (Can you hear the phone ringing already?)

You could go into your account every day and manually check the spend of course. You could even do that every hour…ughh…

But wait! It doesn’t have to be that way.

You can still sleep comfortably, knowing that your ad spend is within range, without wasting your time on endless checks.

If you want to make sure your account is not overspending its budget, here’s a script you can use.

Continue reading “Google Ads Script – Monthly Budget Target Email Alert”

How Google Adsense’s move to position first bidding might be hurting your Google Ads account

ICYMI:

Google switched to position first bidding for the Adsense auction Nov 17 2021. (source from Google doc)

The Adsense auction is the auction where your ads in the Search Partner network compete.

I’ve seen some accounts where this traffic has exploded in recent months and the quality can be terrible.

Continue reading “How Google Adsense’s move to position first bidding might be hurting your Google Ads account”

The Best Google Ads Scripts of 2021

Top Google Ads Scripts 2021
Top Google Ads Scripts 2021

With TONs of scripts out there where do you even begin?! 

Let me spare you the pain of endlessly searching for, installing and testing the best Google Ads scripts that came out in 2021. Here’s a list of my favorites.

Be sure to also check out my all-time list of over 400(!) Google Ads Scripts.

Continue reading “The Best Google Ads Scripts of 2021”