You know those nightmares where your reflection comes out of the mirror and steals your life? Just me? Well, anyway, this is like that — but in AdWords.

Sometimes you make a mistake with AdWords Editor, but instead of changing the existing ad, you create a new one. Or you’re overzealous in converting your old standard ads and make two expanded text ads (ETAs) instead of one.

Suddenly, you’ve got multiple ads that are exactly the same. That means your ad testing isn’t working right, because the traffic isn’t being served evenly between the different ad variants; instead of an A/B test, it becomes an A/A/B test. Even if your testing works, the data is split out between the doppelgängers (that’s German for “ghostly twin,” or something).

On top of this, it’s adding needless complication to managing your account. If you’re labeling up different variants, you might catch one but not the other. If you want to pause ads and replace them with sales or seasonal messaging, you’ve got to make sure you cover all the clones instead of just one ad per ad group.

So the tech team at Brainlabs (my employer) decided to write a script to solve the problem. It goes through each ad group and finds ads that are the same — either completely identical down to the landing page, or just with the same messaging.

It then looks at the ads’ performance over the last 30 days: the best performing ad (according to your choice of metric) is given a “keep” label, while its evil twin gets a label telling you to pause it. Then you can review the script’s work and comfortably clear your account of copied clutter.

To use, copy the code below into a new AdWords script in your account. Then adjust the options at the top:

[Read the full article on Search Engine Land.]

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