[Google Ads Script] Tag your winning search ads

Here’s my catch of the day: a script by fellow PPC friend Kian N’jie.

SCRIPT: Winning Search Ad Tagger

URL: https://docs.google.com/document/d/1OTvluEAh9d8nt5B-sHcu5oyipu1jVqGd6bxuEyolWoI/view

What it does:
This script reviews all the RSAs within each enabled ad group, then labels the ad with the highest “conversions per impression (CPI)”, where CPI = CTR*Conv.Rate. It looks at data over the last 30 days and labels the winning ad ‘Current Winner’. This allows for easy filtering and organization via Google Ads Editor or any other tool. The script also updates these labels each time it runs when you schedule it to run regularly.

Why you care:
When you are A/B testing your ad copy, CPI is a key metric that shows the ratio between impressions and conversions.

I’ll let Brad Geddes explain:

When you consider ad testing, which combination is better?

A) A high CTR and a low conversion rate
   – Lots of people click on your ads, so your page gets a lot of visibility, but not many of those users convert

B) A low CTR and a high conversion rate
   – Not many people click on your ads, but of those that do, many of them convert

It’s impossible to say which is better since that information relies on two different metrics: CTR and Conversion rate.

What CPI does is combine these two different metrics to form one single metric that will show you which ad will receive the most conversions from the impression.

PRO TIP: Add CPI as a custom column in your Google Ads interface to easily see the different CPI values for your different ads.

– Nils

PS: This script would be even better if it only looked at ads that had gained a significant amount of impressions before choosing a winner. It currently looks at all enabled ads, irrespective of the number of impressions, which I think is a mistake. If you agree and want the version that does take a minimum number of impressions into account -> send me an email at nils@nilsrooijmans.com.

Author: Nils Rooijmans

Google Ads Performance Architect with a passion for PPC Automation & AI, in particular via Google Ads Scripts.