Fixing a missing google_product_category using OpenGraph tags

23 November 2019

Recently, as part of a Facebook Pixel/catalog(ue) setup, I had the job of adding microdata tags to a WordPress site. I settled on the OpenGraph protocol and added all the required tags listed on Facebook for Developers to the header of the site. But when I tested one of my tagged pages using the Facebook microdata debugger, I got a warning telling me "A product is missing a field: google_product_category".

Google Product Category misssing

Facebook for Developers had said nothing about this because it only listed the required tags - and google_product_category is optional (hence the debugger generating a warning rather than an error). Fortunately Google Merchant Center Help was more forthcoming, even providing an .xls download of all Google product categories.

But the Merchant Center Help did not explain how to add the product category using OpenGraph, or even if it was possible to do so. It took a Stack Overflow question and answer (both from the same user) to confirm that it was possible, using the form:

<meta property="product:category" content="">

In retrospect, I should have been able to work this out by looking at some of the other tags:

<meta property="product:brand" content="">
<meta property="product:availability" content="">
<meta property="product:condition" content="">

It's also worth noting that the content of the category tag can be either the category ID or the category name. Using the ID seems the easier option, not least because the category name has to be URL encoded AND it's necessary to give the full path.  Whereas using the ID is nice and simple, for example:

<meta property="product:category" content="888">


Notify of
Inline Feedbacks
View all comments
Christoffer Steenbeck

Thank you! Wow, I've tried like all possible versions of this graph setup for the last two hours.

Finally I now get: "Congratulations! Your microdata looks great!"

What a great message! 😀

/ Chris

1 year ago

lovely , I was in stuck and finally found your blog! Thanks , you same my tons of seconds.

7 months ago

well done mate!! Thank you

Avi Zephyra
7 months ago

Saved my ass with this article! Thank you so so much.

Dominique Moreno-Baltierra
Dominique Moreno-Baltierra
6 months ago

Thank you SO much!! I've been researching these seemingly missing OpenGraph tags for the past hour and yours is the only article that explained it in plain English.

5 months ago

Thank you so much!

6 days ago

Pffffff.......finallyyyyyyyyy some to explain it. HUGE thank you. THANKS.

#shopify #facebook #google_product_category

Last edited 6 days ago by Petar
James Clark
Hi! I'm James Clark and this is my website. Need help with your own website's analytics, SEO, content or ads? Contact me
Copyright © James Clark
What do you think? Leave a commentx
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram