Update on 19th July, 2018: This script now supports Responsive Search Ads as well.
Update on 29th Nov, 2018: This script now enables assigning a label to poor performing ads.
Update on 29th January, 2019: This script now supports 3rd Headline and 2nd Description for Expanded Text Ads.
All ads are not created equal. When you create multiple ads in an ad group, there are certain hypotheses you go with. You may wish to emphasize on call to action in one ad. You may highlight different USPs in different ads. You may want to talk about the offers on certain products and services. You want to put those ads out there see which ones resonate with your audience the most. You may not know which ads will perform the best or how much better the best ad(s) can perform compared to other.
In an AdWords account, running poor performing ads can drag your performance in variety of ways.
- Your budget is being wasted on ads that are not bringing enough customers.
- Winning ads are starved of impressions. Better ad is right there, but is not being enough chance.
- If your competitors are running their best ad, they can raise their bids and in turn raise your CPCs as well.
Having multiple ad copies for A/B testing and rotating the ads delivery is a common practice to get better ads being shown frequently. But, making sure that a methodology is in place to pause the bad ads is another practice that you should follow. While there is no benchmark set for the number of ad copies that must run in an ad group, knowing which ones are eating away major chunk of your ad budget without delivering is worth knowing.
We have come up with an AdWords script to help you analyze your account for the winning and poor performing ads.
This script pulls ads performance data from your AdWords account and recommends one of the following – (a) You should pause the ads that are performing poorly. (b) You can pause all ads except the ones that are proven to be the winners. (c) You can reactivate some of your better performing ads. The ads will be highlighted as per following color code
When the script is complete, it will create a folder named “Ads Performance Reports” in your Google Drive. The drive will contain the result sheet which has same name as your AdWords account’s name along with the Customer ID for that account.
Right at the top, you will get the summary of the recommendations. The summary shows an extrapolation of improvement you can achieve if you run only your best ads. (Click on the image to view bigger, easily readable image.)
After the summary, you will see recommendations for each ad group. The ad that delivers highest number of conversion for given impressions is chosen as the winner. Statistical significance is also shown for the winning ad.
Taking Action on the Results
The script will not make any changes to your account. Once you run the script, you will get a result sheet as shown above. Now, you can use the AdWords web interface or the AdWords Editor to pause the ads that are not performing well.
The aforementioned is no longer applicable. Make a note of the following update
Update on 29th Nov, 2018.
This script now has the option to assign a label to poor performing ads. Advertisers can filter the ads using this label, compare performance of the labeled ads with other ads and if the labeled ad is indeed performing poorly, pause it or take any other necessary action.
Steps to review the recommendations.
- Go to the “Ads” tab in your account.
- Filter the Ads with the label created for poor performing ads.
- Sort the ads in descending order of conversions (or any other metric important for you, such as Ad Spend, Clicks, Impressions)
- For each ad, visit the ad group in which that ad exists.
- Check all the ads in that ad group.
- If the labeled ad is performing poorly to other ads in the ad group, you may pause the ads.
- You need to repeat this task.
- We strongly recommend you to verify that each ad identified as poor performing is indeed performing poorly and you want to pause it. Pausing ads in bulk, without verification, may result in delivery or performance issues.
How to use the Ad Performance AdWords Script?
Now that you know what the AdWords script can do, let’s talk about the script. You can get this script here. If you are in a hurry, run this script and see the results in your Google Drive in the folder named “Ads Performance Reports.” You can schedule this script to run every week or every month so that it becomes part of your routine. If you are scheduling the script, you should change the SEND_EMAIL_ALERT variable.
For those who want to understand more about this script, here we go. Here are the variables that you can change to customize it to your requirement.
- REPORTS_FOLDER_PATH: This is the name of the folder that gets created in your Google drive. By default the name is ‘Ad Performance Report’. If you wish to change the name you can do so here.
- MAX_ADGROUPS :This variable specifies number of top ad groups to be included in the report. By default, this report is generated for top 100 ad groups in the account, by spend.That is, the report is generated for top 100 ad groups, by spend. You can increase this limit, if you are running a large account. From our experiments, we have see that it takes approximately one second to process one ad group. Increasing this limit will make the script run longer. A script can run for a maximum of 30 minutes, which means, about 2000 ad groups will be processed at a maximum.
- DATE_RANGE: You can use some pre-defined ranges like LAST_30_DAYS or LAST_14_DAYS. By default, the script will get the data for last 30 days.
- USE_CUSTOM_DATE_RANGE: If you want a particular date range to be used then, set this flag to “true” and modify the START_DATE and END_DATE to indicate the date range. The date format is “yyyy-mm-dd” aka “Year-Month-Date.” For example, if you want a report for 3 months from 1st January, 2017, the START_DATE would be “2017-01-01” and END_DATE would be “2017-01-31.” This is useful if you want to use historical data for better accuracy.
- SEND_EMAIL_ALERT: If you wish to receive an e-mail alert for any new recommendation then set the flag to true which is by default set as false. This is useful if you have running script at regular interval via a schedule.
- EMAIL_RECIPIENT: If the above variable is set to true, then you need to add the e-mail id on which you wish to receive the alerts about new recommendations.
- IGNORE_PAUSED_CAMPAIGNS, IGNORE_PAUSED_ADGROUPS, IGNORE_PAUSED_ADS: These flags indicate to ignore paused campaigns, ad groups and ads. By default, campaigns and ad groups are set to true i.e. all the paused campaigns and ad groups are ignored, however, ads are set as false i.e., all the paused ads with impressions are looked into too.
- MIN_CONFIDENCE_LEVEL_TO_DECLARE_WINNER_AD: The default value is set as 0.9 or 90% to define a winning ad, if you wish to alter this value you can do so here. If you want a higher confidence of, say 95%, set the value to 0.95.
- IS_MCC_ACCOUNT : This flag is to indicate whether you will be running this script at MCC-level. By default, it is set to false. Change it to “true” if you want to use for all the linked accounts in your MCC account. The results for each account will be stored in a separate sheet. Be careful, if you have many many accounts.
- FILTER_ACCOUNTS_BY_LABEL : If your MCC account has tons of linked accounts, you may not want to run this script for all the accounts. In that case, turn this flag to “true” and then specify the label with ACCOUNT_LABEL_TO_SELECT variable. Only the accounts with the specified label will be analyzed to generate this report.
Update on 19th July, 2018: This script now supports Responsive Search Ads. Since Responsive Search Ads are still in Beta, we strongly advise you run them along with Expanded Text Ads in each ad group. BTW, check out our Responsive Search Ads Preview Tool.
Once again, here is the link to Ads Performance AdWords script.
Feel free to send us an email (support AT karooya.com) if you have any queries for this AdWords script.
If you are looking for more, here are the AdWords scripts published by Karooya.
Related Links:
Jerry
Hi Shashikant,
Thanks for this great script.
Wanted to check on this error – The coordinates or dimensions of the range are invalid. (line 652).
Do you have a workaround?
Cheers
Sachin Doshi
Although we haven’t seen that error yet, one scenario that I can think of when such an error can occur is ‘when there are very large number of ads’. Is that the case with your account? Did you try excluding the disabled ads? You can do so by setting the variable IGNORE_PAUSED_ADS=false;
Could you please share a little more information about your account such as number of campaigns, Adgroups and ads? Do you see any other warning/error in the Logs while executing the script?
Ed Goss
This is great! I’ve always been hesitant to install an automated ad testing scripting into my MCC because it takes away too much control. This is perfect since it just provides actionable insights without changing anything. Will help tremendously… now I just have to get this “carefully” installed when I have time to focus on it.
Shashikant
Ed,
This script does not take away any control. It enables you to run automated ad tests in a faster and easier way. This script will not do any changes whatsoever to your accounts.
The only thing this script takes away is hours of manual labor spent on fidgeting with spreadsheets.
Go ahead, install it without any fear.
Ed Goss
The script generally works great, except that quite a few accounts in my MCC aren’t showing up in reports. I have tried increasing the ad groups, specifying a label to reduce to just the accounts I need reports on, and no change. Your script runs in a few minutes, so it is not timing out. I have also checked user access, there is no difference between the way I am connected to working and non-working accounts (client manager). These accounts are included in other MCC scripts I run. Any idea why some accounts simply aren’t included in your reports?
Sachin Doshi
Hello Ed,
Thank you for bringing it to our notice. The log messages that you shared over email helped us to identify and fix couple of bugs. You can now download the updated script from the same location as above.
Please, do let us know how it works for all the accounts this time.
Ed
Thanks for the great/fast support on a FREE script. The script is working perfectly now. This will be a big help for my AdWords team and clients!
Bene
Wow- what a cool script. I really like it. I have one question: as the winner is chosen by “conv per 100 Impr” it is very lead oriented.
How can I adjust it to a reach approach so that CTR is the critical metric an all calculations a made on CTR?
Thanks for help.
Shashikant
Hi Bene,
You may try changing the following
function computeConvPerImpr(ad) {
return (cleanAndParseFloat(ad[‘Conversions’]) * 100.0 / cleanAndParseInt(ad[‘Impressions’]));
}
to this.
function computeConvPerImpr(ad) {
return (cleanAndParseFloat(ad[‘Ctr’]);
}
See if it works for you then.
Mary
for this change, do you not need to adjust the “function computeConvPerImp” part since it seems to be looking at conversions per impression still?
Shashikant
Hi Mary,
Changing the function “computerConvPerImp” should make the script compute the winners based on different parameter.
Please send us an email if you need any help.
Yang Jieyu
Hi Shashikant,
Would like to check – is it possible to take conversion rate as the main point of comparison. Following which, if there are no conversions, the script uses click through rate as the main comparison?
Cheers,
Jerry
TCO23
Worked fine until this week. I’m getting an error about UNSUPPORTED_VERSION: RequestError.UNSUPPORTED_VERSION. (line 564)
return AdWordsApp.report(query, API_VERSION);
}
Sachin Doshi
Hello TCO23,
Please use the latest script (re-download the script from same link mentioned as above). We have recently updated the script to use the newest AdWords APIs. So, it should resolve the UNSUPPORTED_VERSION error for you.
For All,
Please also note that, now, the new script can be configured to generate recommendations to either improve Conversions or to improve Ctr (Check the variable named OPTIMIZE_FOR). The default option selected is OPTIMIZE_FOR=’CONVERSIONS’.
Stephen Kimani Njuguna
History
Accessing AdWord account: XXX MCC
Fetching data from AdWords..
Invalid reporting query: UNSUPPORTED_VERSION: RequestError.UNSUPPORTED_VERSION. (line 621)
I get the following error in my logs and the data is not showing in the subsequent Google sheet which is created
Sachin Doshi
Hi Stephen, Thanks for reaching out. We have updated the script to use newer versions of the AdWords APIs. Please re-download the script from same link as above.
Samuels
I am getting:
ReferenceError: “trackEventInAnalytics” is not defined. (line 93)
Sachin Doshi
Hello Samuels, Can you share more details? We don’t see any error with the current script. Looking at your error message, it appears that there could be some syntax error in your script. Could you please re-download and see if the original script works fine?
Sachin Doshi
Hello Tony,
If you want to set the custom date range to be 1 Jan, 2017 to 31 Jan 2017, you will need to set the three variable as following —
var USE_CUSTOM_DATE_RANGE = true;
var START_DATE = “2017-01-01”;
var END_DATE = “2017-01-31”;
Hanna
Thanks for a really useful script! Is it possible to only have ad groups with recommendations printed in the output sheet? As in, excluding all the ad groups where there was no statistical significance between ads?
Sachin Doshi
Hanna,
We have recently updated our script to label the ads which are performing poorly. You can then filter the ads with the label in AdWords UI to easily review only the ads that need an action. Hope this helps.
David
Is there a way to update this script to place the document in a predefined location in Drive?
Sachin Doshi
Yes. You can edit the variable named ‘REPORTS_FOLDER_PATH’ in the script to point to the desired folder in your drive. Please note that the value of the variable should corresponds to the directory structure in your Drive (and not the url of destination directory). For example – REPORTS_FOLDER_PATH=’Folder1/Sub Folder/Reports’;
Matthew
Hi, I’m getting an error on line 675 – Invalid reporting query: AD_PERFORMANCE_REPORT. (file Code.gs, line 675)
Only changed:
added my email address
line 42 to optimize for CTR
line 54 to remove zero impression ads to false
Sachin Doshi
The script seems to be running fine for us.
Are you running the script from MCC account?
If you are running the script from MCC account, please make sure that the IS_MCC_ACCOUNT flag is set to true at line#66. You may also want to edit the next lines to select the desired Ads accounts.
Alternatively, you can copy the script at the individual Ads account level and run the script from there.
Joel Hereth
How do account for H3 can we simply add it like this?
var query = “SELECT CampaignId, AdGroupId, Id, CampaignName, AdGroupName, CampaignStatus, AdGroupStatus, ” +
“Status, AverageCpc, AveragePosition, Clicks, Ctr, Impressions, Cost, Conversions, CostPerConversion, ” +
“ConversionRate, AdType, Headline, Description1, Description2, DisplayUrl, CreativeDestinationUrl, ” +
“CreativeFinalUrls, CreativeFinalMobileUrls, CreativeFinalAppUrls, HeadlinePart1, HeadlinePart2, HeadlinePart3” +
“Description, Path1, Path2, ” +
“ResponsiveSearchAdPath1, ResponsiveSearchAdPath2, ResponsiveSearchAdHeadlines, ResponsiveSearchAdDescriptions ” +
” FROM AD_PERFORMANCE_REPORT ” +
” WHERE AdType IN [‘TEXT_AD’, ‘CALL_ONLY_AD’, ‘EXPANDED_TEXT_AD’, ‘RESPONSIVE_SEARCH_AD’] ” + whereStatements +
” DURING ” + dateRange;
Shashikant
Joel,
Headline 3 is not available in the AdWords script as yet in the Ads Performance Report. We will update the script once it becomes available.
However, you can still use the script, which will label poor performing ads, including the 3 Headline ETA. Then, you can review those ads in Google Ads UI and take appropriate action.
Shashikant
Joel,
The script now supports 3rd Headline and 2nd Description.
–shashi
Joel Hereth
Will creating a label change only my report or my campaigns as well?
Sachin Doshi
The script will only label the ads (that are performing poorly) in your Google Ads account. It will not make any other changes to your account. The script will also send you am email explaining what the new label is; and steps to review the labeled ads.
Dave
Thanks for the script. all works fine except, the labels not show up in the account to show poor ad’s. any thoughts ?
Cheers
Dave
Sachin Doshi
Dave, thanks for reaching out. The script seems to be working fine for us including Ad labels.
Can you please confirm if the flag ‘LABEL_ADS’ is set to true (at lLine#35)? Have you made any other modifications to the script?
Please also note that, if you are executing the script from script-editor window, you need to click the ‘RUN’ button. Clicking PREVIEW will only create xls report, but it wont modify your Google Ads account.
Lastly please check the script execution log from ‘SCRIPT HISTORY’ section. Please let us know if you see any error or warning messages in the log.
Mike
Will you be adding support for campaign specific reports and not account level?
michael yost
Hey this script is great, any way i can make it to where it only looks at certain campaigns i.e. campaign name contains X?
Kirti
Hi Michael,
Unfortunately, currently the script does not support filtering specific campaigns. We will consider this feature request in future updates to the script.