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:
- campaignNameDoesNotContain and campaignNameContains are used to filter campaigns. For example if campaignNameDoesNotContain is [“Display”, “Shopping”] any campaign with “display” or “shopping” in the name will be ignored. If campaignNameContains is [“Brand”, “Generic”] then any campaign without “brand” or “generic” in the name is ignored.
- They are not case-sensitive.
- If you need to put a double quote in, put a backslash before it.
- If ignorePausedCampaigns is true, then the script will only look at currently active campaigns. Set them to false if you want to look at currently paused campaigns.
- If checkUrl is true, ads are only treated as duplicates if they have the same final URL as well as the same ad copy. If this is false, then ads are treated as duplicates even if they have different landing pages.
- Set this to true if you have landing page tests going on.
- metric is the name of the stat used to pick which of the duplicate ads is the best.
- You can choose from CTR, clicks, impressions, cost, average CPC and conversions.
- If caseSensitive is true, then the script will pay attention to capitalization when comparing ad text: “Buy This Now” will be treated as different to “buy this now.” If this is false, then ads with the same text but different capitalization will be treated as duplicates.
- This just affects the ad copy. If you’re checking the final URL, this will always be considered case insensitively.
- keepLabel is the name of the label applied to the best duplicate ad. It indicates that this is the ad you should keep active.
- Similarly, pauseLabel is the name of the label applied to the rest of the duplicate ads. This label shows the ads you should pause.
If the script does time out, you can run it again; it will ignore any ads it has previously labeled. If your account is really big, you might need to run it on part of the account, rather than the whole account: use campaignNameContains and campaignNameDoesNotContain to look at different sets of campaigns on each run.
Some opinions expressed in this article may be those of a guest author and not necessarily Search Engine Land. Staff authors are listed here.