How Account Quality Score Can Guide AdWords Optimization

Last month, I covered four ways to use AdWords Scripts to improve AdWords account management. I didn’t share any actual code for fear of geeking out too much, but people seemed interested enough in how to use Scripts to track historical Quality Score (QS), so this month, I’ll share step-by-step instructions and give you the […]

Chat with SearchBot

Last month, I covered four ways to use AdWords Scripts to improve AdWords account management. I didn’t share any actual code for fear of geeking out too much, but people seemed interested enough in how to use Scripts to track historical Quality Score (QS), so this month, I’ll share step-by-step instructions and give you the code needed to track your own account-level Quality Score.

But first, let me explain what account-level Quality Score is all about…

Why You Should Track Account-Level Quality Score

The Quality Score of your AdWords account is a useful gauge to monitor how good Google thinks your optimizations are. Rather than tracking the QS of every keyword in an account, which is not only tedious but also not very useful when an optimization includes new keywords and removes others, you can roll up the keyword-level data into an account-level number.

Then, when you want to know if your account is headed in the right direction, the account-level QS number can provide the answer.

Why Can’t I See Account Quality Score In AdWords?

Technically, Google does not have a metric called account-level QS; it’s not a number that’s published anywhere. It’s not just that Google hides this number from advertisers, it’s not even available to your CSR, or for that matter, Larry Page. When I worked at Google, I got asked all the time if there was a QS reset button in Sergey and Larry’s office, and no, unfortunately, there isn’t.

Because QS is based on so many historical factors, the only way to get rid of poor QS is to start running lots of ads that have better QS, thereby reducing the negative QS impact from older ads.

Account-level QS is merely a construct that helps us understand and predict how a complex prediction algorithm (the QS system) might behave under certain circumstances. AdWords’ QS is a complex learning system that tries to guess for every single query which ads users will find most useful. Those predictions use historical data to guess possible outcomes of future searches.

So, when a keyword in your account has lots of impressions, Google uses that keyword’s historical CTR from your account to make an educated guess about the future performance of that keyword, and that’s how it gets its keyword-level QS. This keyword-level QS is the only insight into QS that you get from AdWords, and keep in mind that it’s an attribute and not a stat.

In other words, even if you change the date range in AdWords, you will always get the same number, which is an indication of the current QS.

How Quality Score Is Determined For New Keywords

But, how does the QS system make a prediction when you add a new keyword to AdWords for the first time and there is no historical CTR data for that keyword in your account? How does Google then set the starting Quality Score for that keyword? It’s complicated, but part of the answer is that they look at similar signals to make their guess.

Similar data includes system-wide data about how your new keyword has performed when other advertisers used it. And, when your account has been around for some time, Google can also use its notion of how your historical performance has been compared to the expected average.

Here’s an example: Google might expect a particular new keyword to have a starting QS of 6 based on the historical CTR of all other advertisers who have used this keyword, but because they know that your account typically has a better than average CTR performance, they may boost your starting QS to a 7.

They do so under the assumption that you are likely to perform better than average for a new keyword because you’ve historically had very relevant ads for other keywords.

How Can I Calculate Account QS?

Quality Score in AdWords is reported only at the keyword level, and that’s where it’s used in combination with the bid to determine the ad rank. One way to think about account-level QS is as an impression-weighted average.

In last month’s post, I explained the math behind calculating the account QS. Now to automate this, we can write a simple script that iterates through all keywords in an account and does this calculation for us.

Account Quality Score Calculation Script

AdWords Scripts

Add a new script from Campaigns > Bulk Operations > Scripts in your AdWords account.

 

In the new script, replace all the sample code with the code below:

 

function main() {

var totalImpressionsAnalyzed = 0;

var totalQualityScoreAnalyzed = 0;

var keywordIterator = AdWordsApp.keywords()

.withCondition(“Status = ENABLED”)

.withCondition(“CampaignName CONTAINS_IGNORE_CASE ” +
“Insert Your Campaign Name Here”)

.withCondition(“CampaignStatus = ENABLED”)

.withCondition(“AdGroupStatus = ENABLED”)

.orderBy(“Impressions”)

.forDateRange(“LAST_30_DAYS”)

.withLimit(100000)

.get();

while (keywordIterator.hasNext()) {

var keyword = keywordIterator.next();

var qualityScore = keyword.getQualityScore();

var keywordStats = keyword.getStatsFor(“LAST_30_DAYS”);

var impressions = keywordStats.getImpressions();

var qualityScoreContribution = qualityScore * impressions;

totalQualityScoreAnalyzed = totalQualityScoreAnalyzed + qualityScoreContribution;

totalImpressionsAnalyzed = totalImpressionsAnalyzed + impressions;

}

var accountQualityScore = totalQualityScoreAnalyzed / totalImpressionsAnalyzed;

Logger.log(“QS: ” + accountQualityScore);

}

 

You can simply copy and paste this code into a new script, authorize it and then preview it. The only thing you should modify is to replace “Insert Your Campaign Name Here” with the part of your campaign names that indicates it’s a search network campaign.

Because ads that run on the Google Display Network and on mobile devices have their own separate QS, you want to process only data from keywords that are in campaigns targeting Google.com search to get an accurate result.

Get The Latest Data Automatically Every Day

While this script automates the calculations you could otherwise do in a spreadsheet, you don’t want to have to run this script manually every day, so let’s set it up to run automatically every day.

Schedule AdWords Script

 

3 Ways To Maintain Your Tracking History

While it’s helpful to know what your account QS is, it’s most useful when you put it into the context of changes you’re making to your account. Knowing that your account QS is a 4 tells you that you need to start optimizing. Knowing that your QS went from a 4 to a 5 tells you you’re doing something right.

So let’s get the QS out of the script and into a place where you can track it.

Here are three ways to extend the script by sending the QS to somewhere useful for you. You can simply add the lines of code for the technique you want to implement just before the final ‘}’.

1.  Send It By Email

The simplest way to get the QS out of your account is to deliver it to your inbox every day.

 

var recipient = "[email protected], [email protected]";
var subject = "Account Quality Score";
var body = "Account Quality Score:\n\n" + accountQualityScore;
MailApp.sendEmail(recipient, subject, body);

 

2.  Add It To A Spreadsheet

An easy way to get the historical perspective is to add the Quality Score and the date to a spreadsheet every day.

var date = new Date();
var spreadsheetUrl = "Insert Your Google Spreadsheet URL Here And Make Sure Your AdWords Login Has Edit Privileges For This Spreadsheet";
var qualityScoreSheet = SpreadsheetApp.openByUrl(spreadsheetUrl).getActiveSheet();
qualityScoreSheet.appendRow([date, accountQualityScore]);

 

Now, when you make significant changes to your account, you could add an annotation to the spreadsheet on the date when the change was made. For example, when you add a big batch of keywords, put a note along the lines of “added new keywords <url to list>.”

This annotation will be useful, as described further below, when we turn this spreadsheet into a chart for a dashboard.

Account Quality Score in a Google Spreadsheet

Add annotations next to each date so you can track how it impacts Quality Score

 

3. Send It To An API

If you want to send the QS into your own database, that can be done in a single line of code, but you do need to have your own API for accepting this type of data. A simple API is just a URL that you can call with some variables that contain the data.

My own API call looks like this. You’d replace the part with my URL with your own URL:

 

var response = UrlFetchApp.fetch("https://www.toptiermarketing.com/api.php?action=add_qs&qs=" + accountQualityScore);

 

Charting Quality Score Progress

When you put the QS into a Google spreadsheet every day, you can easily turn that into a chart and even embed that chart into your own custom dashboard. If you want to see QS along with a few other metrics from your AdWords account, my friend Nick Mihailovski from Google Analytics shared a great script to pull data from Analytics into a Google spreadsheet.

Annotated Quality Score Tracker

Monitor how changes to your AdWords account impact your account-level Quality Score.

If your AdWords and Analytics accounts are linked (as they should be for more advanced remarketing capabilities), you can use this script to make custom AdWords charts that combine data from your account with data you calculate yourself like Quality Score.


Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed here.


About the author

Frederick Vallaeys
Contributor
Frederick (“Fred”) Vallaeys was one of the first 500 employees at Google where he spent 10 years building Google Ads and teaching advertisers how to get the most out of it as the first Google AdWords Evangelist. Today he is the Cofounder and CEO of Optmyzr, a PPC management SaaS company focused on making search, shopping, and display ads easier to manage with rules, scripts, reports, audits, and more. He is a frequent guest speaker at events where he inspires organizations to be more innovative and use AI and Automation Layering to become better marketers. His latest book, Unlevel the Playing Field, follows his best-seller, Digital Marketing in an AI World.

Get the must-read newsletter for search marketers.