Google will frequently disapprove products in a Google Merchant Center feed through automated checks. This can happen even if there aren’t really any problems. One common example is the “Unable to view store on desktop” error. Google’s bot will crawl a landing page for a product and for one reason or another the crawl will not be successful. For example, Google’s policy is that your pages should be available at all times from all locations. A crawler based outside the US needs to be able to access your product pages, even if your feed’s target country is the United States only. Servers might have firewalls configured to block traffic outside the US or to block certain international browsing activity, impacting Google’s crawlers. If a product mistakenly gets disapproved or legitimately needs to be fixed, you may need to react quickly to get it back up and running – possibly by requesting a manual review of a product URL. Unfortunately it isn’t always easy to see when an important feed product has been disapproved by Google. Inside the GMC user interface, under your user’s email preferences, you can enable product data alerts, but this will only let you know when a number of items drops significantly. What if you have one or a few items that are especially important, and you want to know if those have been disapproved? Luckily there’s a script for that.
Product Checker Script
Inside the Google Ads interface, you can schedule a script to run every morning to check that your important feed products are still approved. You do this by logging into your Google Ads account and going here:
Tools > Bulk Actions > Scripts
Add a new script, and under “Advanced APIs”, check the box for “Shopping content.”
An example script that checks the status of four products is below. The highlighted parts should be filled in with values for your specific implementation. Whichever Google Ads user you use to save the script must also have access to the Google Merchant Center Feed.
———————
function main() {
function main() {
var ACCOUNT = "ACCOUNT NAME GOES HERE";
var NOTIFY_EMAIL = "EMAIL ADDRESS TO NOTIFY GOES HERE";
var MERCHANT_ID = "MERCHANT ID NUMBER GOES HERE";
var DISAPPROVED_STRING = '"status":"disapproved"';
// var productList= ShoppingContent.Products.list(MERCHANT_ID);
// Logger.log(productList);
var checkProducts = [];
checkProducts.push("REST GMC PRODUCT ID GOES HERE");
checkProducts.push("REST GMC PRODUCT ID GOES HERE");
checkProducts.push("REST GMC PRODUCT ID GOES HERE");
checkProducts.push("REST GMC PRODUCT ID GOES HERE");
var disapprovedProducts = [];
for (var i = 0; i < checkProducts.length; i++) {
var productStatus = ShoppingContent.Productstatuses.get(MERCHANT_ID, checkProducts[i]);
Logger.log("Product ID: " + checkProducts[i] + " Product Status: " + productStatus);
if(productStatus.toString().includes(DISAPPROVED_STRING)){
disapprovedProducts.push(checkProducts[i]);
}
}
if(disapprovedProducts.length > 0){
notifyStatus(ACCOUNT, NOTIFY_EMAIL, disapprovedProducts);
}
}
function notifyStatus(account, email, products){
var TO_NOTIFY = [
email
];
var subject = "Disapproved Product(s): " + account;
var body = "GMC product(s) disapproved for " + account + ": " + products.join(", ");
for (var i in TO_NOTIFY) {
MailApp.sendEmail(TO_NOTIFY[i], subject, body);
}
}
var ACCOUNT = “ACCOUNT NAME GOES HERE“;
var NOTIFY_EMAIL = “EMAIL ADDRESS TO NOTIFY GOES HERE“;
var MERCHANT_ID = “MERCHANT ID NUMBER GOES HERE“;
var DISAPPROVED_STRING = ‘”status”:”disapproved”‘;
// var productList= ShoppingContent.Products.list(MERCHANT_ID);
// Logger.log(productList);
var checkProducts = [];
checkProducts.push(“REST GMC PRODUCT ID GOES HERE“);
checkProducts.push(“REST GMC PRODUCT ID GOES HERE“);
checkProducts.push(“REST GMC PRODUCT ID GOES HERE“);
checkProducts.push(“REST GMC PRODUCT ID GOES HERE“);
var disapprovedProducts = [];
for (var i = 0; i < checkProducts.length; i++) {
var productStatus = ShoppingContent.Productstatuses.get(MERCHANT_ID, checkProducts[i]);
Logger.log(“Product ID: ” + checkProducts[i] + ” Product Status: ” + productStatus);
if(productStatus.toString().includes(DISAPPROVED_STRING)){
disapprovedProducts.push(checkProducts[i]);
}
}
if(disapprovedProducts.length > 0){
notifyStatus(ACCOUNT, NOTIFY_EMAIL, disapprovedProducts);
}
}
function notifyStatus(account, email, products){
var TO_NOTIFY = [
];
var subject = “Disapproved Product(s): ” + account;
var body = “GMC product(s) disapproved for ” + account + “: ” + products.join(“, “);
for (var i in TO_NOTIFY) {
MailApp.sendEmail(TO_NOTIFY[i], subject, body);
}
}
———————
This is how to fill in the highlighted fields:
ACCOUNT and MERCHANT_ID: Log into Google Merchant Center, the account name and merchant id are in the upper right corner.
NOTIFY_EMAIL: This is your email address where you want notifications to be sent.
REST GMC PRODUCT ID: This is not the same as the ID in your feed. REST IDs are aggregates with the format online:en:label:1111111111. The REST ID consists of the following 4 parts, separated by colons:
Channel (“online” or “local”)
Content Language (using the 2-letter designation, for example en or fr)
Feed label (might be the two-letter code for the feed’s target country, for example US or FR)
Offer ID
For example, if you have a feed with a product that has product ID “1”, the REST ID is probably:
online:en:US:1
You can see the IDs in your feed by uncommenting these two lines in the script and looking over the log output:
// var productList= ShoppingContent.Products.list(MERCHANT_ID);
// Logger.log(productList);
The script is written to check on four different products. You could take some out or add more in. You could also easily rewrite the script to pull product IDs from a Google Spreadsheet and populate the checkProducts array from that.
After you successfully save the script, you can schedule it to run every morning. Here’s more information from Google about saving and scheduling scripts.
Ready to Enhance Your PPC Strategy?
Reach out to us to discuss how we can tailor a strategy to your unique needs.