Boosting your Google Ads Performance with the help of Scripts
Google Ads Script – Disapproved Products Alerts
Stop revenue loss due to disapproved products in the Google Merchant Center.
My inbox is bursting at the seams with evidence of people suffering >10% drop in Google Shopping performance due to product disapprovals, _without them noticing for weeks or even months_!
If you are running Shopping ads, I bet you, at least every now and then one or more products will get disapproved.
No exceptions.
The same goes for products in your Performance Max campaigns.
This is the nature of the beast; products in your shopping feed get disapproved for all sorts of reasons, at times you least expect it.
Your product could be missing a critical attribute value.
There can be a mismatch between your product data in the feed and the listing on your site (price, availability, color, …).
Or someone, somewhere, added a sales discount to your images.(Google will not allow it)
Or Google decided to change their policy for the gazillionth time.
Or…
The list goes on and on.
Here’s the thing:
When you fail to identify a top-performing product being disapproved, sales and revenues crash like the TSLA stock after a Musk tweet.
Keeping up with disapproved products is a MUST!
Monitoring the status of your products is, to say the least, a tedious repetitive burden.
It will result in Obsessive-Compulsive Disorder if you don’t automate the process.
You are constantly checking your Merchant Center account to see if your top-performing products are eligible to run.
Every day, every hour.
Now imagine the comfort of being 100% sure that you will be notified immediately when one of your top-performing products gets disapproved.
After the alert, you can simply jump in, and fix the issue right away.
Your Google Shopping performance is steady.
That’s exactly what my latest script does.
This script notifies you via e-mail when products in your merchant center account, that got a significant amount of clicks, are disapproved.
You can set the threshold for the minimum number of clicks and the date range. This way your sheet and inbox won’t be flooded with alerts for disapproved products that did not get any clicks anyway.
The output will look something like this:
(click image to enlarge)
➥ ACTION: Schedule this script to run daily.
(Don’t worry if you have never run a script before. You do not need any coding skills. It is as simple as copy-paste.)
INSTRUCTIONS:
See the script code below. Install the script in your account.
Don’t worry if you have never done this before. You do not need any coding skills. It is as simple as copy-paste. Simply follow these instructions on how to set up and schedule Google Ads scripts.
Create a new Google Sheet
(tip for Chrome users: simply type ‘sheets.new’ in the address bar)
Add the complete URL of the spreadsheet to the script (line 17)
Add your email address to the script (line 18)
Set min number of clicks and date range (Line 20 and 21)
Add your Google Merchant Center ID (Line 23)
Add your account name (Line 24)
Enable the Shopping API: Go to the top right corner of the script, there is a button ‘Advanced API’s’. Click on that button and enable the Shopping Content API.
* Creates a report indicating which products are disapproved, including the reason why and a way to fix it
* Sends an alert via email whenever products are disapproved
*
* Version 1.0
*
* @author: Nils Rooijmans
*
* contact nils@nilsrooijmans.com for questions and the MCC version of the script
*/
// CHANGE SETTINGS HERE
varSPREADSHEET_URL = ""; //insert a new blank spreadsheet url between the double quotes
varEMAIL = ""; //insert your email adresses between the double quotes. You can add multiple email addresses between the double quotes, just separate them via a comma, ie: "john@doe.com, jane@doe.com"
varMIN_CLICKS = 1; // ignore products with less clicks during the date range specified via PERIOD, NOTE: minimum value is 1
varPERIOD = 'LAST_30_DAYS';
varGMC_ID = ""; // insert Google Merchant Center id between double quotes. NOTE: the account you use to authorize this Google Ads script should also have access to the merchant center account associated with the id
varACCOUNT_NAME = ""; // insert account name between double quotes.
// NO CHANGES NEEDED BELOW THIS LINE
varSHEET_REPORT_HEADER = [
"Product ID",
"Product Title",
"Product Link",
"Clicks",
"Disapproval Reason",
"Solution",
"Documentation"
];
functionmain() {
// first we clear the report sheet and add header
prepareSpreadsheet();
// let's get the products that are of interest
varproductsOfInterest = getProductsOfInterest();
// let's check for disapprovals among the products of interest
//Logger.log("We've got a product of interest to check, \n productId : "+productId+"\n productTitle: "+productsOfInterest[productId].title+"\n Nr of Clicks: "+productsOfInterest[productId].clicks);
Logger.log("- the product is disapproved, productId : "+productId+" reason: "+reason);
disapprovedProducts.push([
product.productId.split(':').pop(), // productId's have the format like "productId" = "online:nl:NL:136258511"
product.title,
product.link,
productsOfInterest[productId].clicks,
reason,
solution,
documentation
]);
}
}
}
}
}
} else{
Logger.log("No more products in account "+ gmc_id);
}
pageToken = productStatuses.nextPageToken;
} while(pageToken);
Logger.log("NR of disapproved products: "+disapprovedProducts.length);
returndisapprovedProducts;
}
functiongetProductsOfInterest() {
varproductsOfInterest = {};
vargaqlQuery = "SELECT segments.product_item_id, segments.product_title, metrics.clicks FROM shopping_performance_view WHERE metrics.clicks >= "+MIN_CLICKS+" AND segments.date DURING "+PERIOD;