In the wake of Google’s announced changes to exact match, contributor Daniel Gilbert offers a passionate argument against the shift, as well as a script to help advertisers regain control.

In case you haven’t heard, Google has decided to ignore function words and word order for exact match keywords.

If you just want to know how to fix this travesty, then scroll to the stopgap solution section where I’m sharing a script from Brainlabs (my employer) which will automatically add so-called “close variants” as negative keywords. Yippee! If you also want to hear me rant about Google’s astonishingly stoopid behavior, then read on…

A few years ago (2014), Google eliminated advertisers’ ability to exclude close variants as part of “exact match,” and they got away with it. People were angry. The industry suffered a blow. But people gradually moved on.

Now they’re messing with exact match again, but this time they’ve gone too far.

In the new exact match universe, an “exact match” can include close variants of the keywords and can also include the same words, but in an entirely different order. Google is denying the importance of syntax, at the expense of the industry and, ultimately, itself.

To clarify, not all syntactic variations of the same set of words will match. Google’s machine learning algorithm will, to some extent, avoid matches where the word order changes the meaning. An obvious example is for flights: [LHR to JFK] is obviously very different from [JFK to LHR], so there’ll be no match there.

When A B C does not equal B C A
But what about the more subtle examples? Where will Google draw the line in terms of when a match will be made and when it won’t? Wherever this line is drawn, our experience shows that it will cause considerable damage to the performance of a campaign: Reduced relevancy means reduced ROI, as Google is fully aware.

There are countless examples from our clients’ accounts where ROI differs substantially based on word order. (I’ll write a follow-up article with more examples and analysis.) To us, it’s pretty obvious that even something subtle like [london hotels] is just not the same as [hotels london], even if they look the same and seem “similar.” The data tells us that they perform differently. Therefore, we’d like to bid differently for those keywords. Is that really so much to ask? In fact, isn’t that level of control exactly what has made Google such a successful platform in the first place?

To me, it’s easy to intuit why Google has decided to do this. They’ve run a test and determined they’ll make more money with this setup. Which they definitely will in the short term. But long-term, removing this control will only mean that sophisticated advertisers see lower ROI from the platform and therefore move budget to other channels.

Why mess with a formula that’s winning for everyone?
Don’t get me wrong. I love Google. Its products are amazing, and I’ve built a business on the back of the company’s ecosystem. I also (as a former Googler) built my career there. Until this bizarre change, it had been a brilliant year for AdWords: amazing new features, insane improvements to the API, a quadrupled functionality of its scripts, more audience targeting options, and they even finally disposed of RHS ads (which was good for advertisers, users and Google).

You were doing so well. Why would you ruin all that great work? Why, Google?!

I have a couple of suggestions that would work out better for all of us:

Introduce your new “similar matching” as the default option, but allow sophisticated advertisers to opt out in advanced settings. That’s easy and won’t cost you anything. Plus, you’ll get the revenue uplift from all the n00bs.

Hire some product managers who have actually run AdWords campaigns themselves. That way, they might understand that this is not a smart move.

I thought about keeping quiet on the matter, as we have a superb working relationship with Google, and they are generally fabulous. However, my concern is that this is the first move toward pushing advertisers and agencies into handing over the keys to their websites, billing details and conversion data and letting Google take the driver’s seat.

If I thought that would help performance, then I honestly wouldn’t mind. But it won’t. Dynamic Search Ads is a great example of why handing control to Google isn’t always the right thing to do. While some of Google’s reps think we should “switch everything to DSA,” any self-respecting, sophisticated campaign manager knows that’s garbage.

I’m not a Luddite either. I love automation and AI. I lead a company entirely dedicated to automating AdWords campaigns and management. But this is a mistake — a huge one that has far-reaching implications.

Rant over — I’m going back to smiling again :)))

A stopgap solution
Assuming Google isn’t going to implement the changes I’ve suggested right away, let me share an approach for the interim.

Back in 2014, we made a script to reverse the changes to exact match. So, to combat the new changes, we’ve made a new and improved version. It looks at the “close variant” search queries in active campaigns from the last 30 days. If a query doesn’t precisely match the exact keyword, that query is added as an ad group negative. You can get an email with a list of the new negatives as well.

Unlike with the older version, you can have more than one keyword per ad group. If particular keywords aren’t set to exact match, the script won’t add those negatives. And if there are multiple exact keywords, the script makes sure the query is different from all of them before excluding it.

There’s also the option to schedule the script to analyze the campaigns without automatically making changes. Then you can just manually review the list of suggested negatives and create them when you’re happy with them.

There are a number of caveats:

It will only work on smallish accounts (I’d estimate up to 10,000 keywords). If your account is bigger or you have lots of accounts, then you need to do this via the API. If you can’t do that yourself, you might look to a partner.

It only adds negative keywords in retrospect, i.e., the similar variation has to appear and be identified before it can be excluded. So you’ll rack up some spend while this process occurs.
You may run into negative keyword limits in a large account.

If you want to be proactive about cross-contamination, there are technological ways to accomplish this. (For example, we have a module in the Brainlabs Tech Stack for this purpose, but it relies on a clean structure that separates exact and broad keywords, either at the campaign or AdGroup level).

Now that we’ve covered the caveats, let’s get to the script. To take back control of your exact keywords, make a new Script in AdWords and copy in the code below. Then, modify the settings below as appropriate for your situation.

campaignNameContains is used to filter the campaigns the script looks at. If you only want the script to look at campaigns that have certain words or phrases in the names, put those words or phrases in the square brackets, in double quotes and separated with commas. For example, if campaignNameContains is [“Brand”, “Generic”] then only campaigns with names containing “brand” or “generic” are included.

campaignNameDoesNotContain is the same, but for words or phrases in the names of campaigns you want the script to ignore. For example if campaignNameDoesNotContain is [“Misspellings”, “Competitor”] then any campaigns with names containing “misspellings” or “competitor” are ignored.

campaignNameContains and campaignNameDoesNotContain are not case-sensitive.

Leave them blank, [], to cover all campaigns.

If you need to put a double quote into the text of the campaign name for either variable, put a backslash before it.

If makeChanges is true, then the script will create the negatives for you. If you’d rather just check through the negatives before making changes, you can set it to false.

emailAddresses is where you put your email address, if you want to be sent a CSV of the new negatives (or the negatives that would be made, if makeChanges is false).

If you don’t want an email, leave this as “”.

Once you have done a preview run and are happy, you can put the script on a schedule to run weekly or monthly — and keep your account exactly as you want it.

* Make Exact Match Exact
* Adds negatives for any search query that doesn’t actually exactly match an exact
* match keyword.
* Version: 2.0
* Google AdWords Script maintained on


var campaignNameDoesNotContain = [];
// Use this if you want to exclude some campaigns. Case insensitive.
// For example [“Brand”] would ignore any campaigns with ‘brand’ in the name,
// while [“Brand”,”Competitor”] would ignore any campaigns with ‘brand’ or
// ‘competitor’ in the name.
// Leave as [] to not exclude any campaigns.

var campaignNameContains = [];
// Use this if you only want to look at some campaigns. Case insensitive.
// For example [“Brand”] would only look at campaigns with ‘brand’ in the name,
// while [“Brand”,”Generic”] would only look at campaigns with ‘brand’ or ‘generic’
// in the name.
// Leave as [] to include all campaigns.

//Choose whether the negatives are created, or if you just get an email to review
var makeChanges = true;

// These addresses will be emailed when the tool is run, eg “”
// If there are multiple addresses then separate them with commas, eg “,”
// Leave as “” to not send any emails
var emailAddresses = “”;

function main() {

var campaigns = {};
var adGroups = {};
var exactKeywords = [];
var exactGroupIds = {};

//Pull a list of all exact match keywords in the account
var campaignIds = getCampaignIds();

var report =
“SELECT AdGroupId, Id, Criteria ” +
“WHERE Impressions > 0 AND KeywordMatchType = EXACT ” +
“AND CampaignId IN [” + campaignIds.join(“,”) + “] ” +
“AND AdGroupStatus IN [ENABLED, PAUSED] ” +

var rows = report.rows();
while (rows.hasNext()) {
var row =;
var keywordId = row[‘Id’];
var adGroupId = row[‘AdGroupId’];
exactKeywords.push(adGroupId + “#” + keywordId);
exactGroupIds[adGroupId] = true;

adGroups[adGroupId] = [[], [], []];

exactGroupIds = Object.keys(exactGroupIds);

// Remove ad groups with non-exact keywords

var nonExactGroupIds = {};
for (var i=0; i -1) {
// This query is a positive keyword in the ad group
// so we don’t want to add is as a negative

campaigns[campaignId] = [[], []];

campaigns[campaignId][1].push(adGroupId + “#” + keywordId);

adGroups[adGroupId] = [[], []];

adGroups[adGroupId][1].push(adGroupId + “#” + keywordId);

//Parse data correctly

var adGroupIds = [];
var adGroupNegatives = [];

for(var x in adGroups){
for(var y = 0; y < adGroups[x][0].length; y++){ var keywordId = adGroups[x][1][y]; var keywordText = adGroups[x][0][y]; if(exactKeywords.indexOf(keywordId) !== -1){ adGroupNegatives[adGroupIds.indexOf(parseInt(x))].push(keywordText); } } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //Create the new negative exact keywords var results = []; for (var i=0; i