Hi there
I’m trying to get Facebook and google shopping set up on my stores and the debuggers and the marketing department are saying I need to add the Microdata, I’ve done this, however we cannot get the product category to work.
This field has recently been added to shopify above the Product Type, which I can include using {{ product.type }}
Any one know if its possible to include the Category in a liquid template?
Sean
Adding products to Facebook or even Google Shopping via structured data (microdata or json) is not a great solution. You need to customize the setup for Facebook to add Google Product Categories, which are very specific values, explained here: https://support.google.com/merchants/answer/6324436?
An easier setup would be use a dedicated app that can easily set up the feeds, such as: https://apps.shopify.com/multiple-google-shopping-feeds
1 Like
Hey Sean,
You can’t add the Product Category via structured data because there isn’t a field defined by Schema.org. As Emmanuel mentioned, you need to use a feed for this purpose. The structured data and feed work together.
There is a crossover between structured data and Merchant Center as Google uses the structured data to qualify for both Rich Results and Merchant Listings. This data is used on Google Organic Search, Google Images, Google Shopping Tab, and YouTube.
What issues are you running into with getting your ads approved? If you share your URL, I can do a structured data audit to see if you have what’s needed. Either share here or send me an email to support@ilanadavis.com
1 Like
@ilanadavis There is a category defined in the schema for products, reference: https://schema.org/category
You can add the data, and now with Shopify adding the Product Category option, you can develop the structured data to use this info.
1 Like
What {{ product.liquid }} tag do I use to reference it in a tenplate though?
I have looked at the objects and can’t find any reference to the new field. I recommend reaching out to Shopify to find the object attribute.
I did and they they told me to reach out here!
Will try plus support.
I meant that there isn’t a field defined by Schema that Google uses. Schema has thousands of fields and has uses beyond structured data. You can’t just pick whatever field you want to use and hope Google knows what it means.
If Merchant Center had a field defined by Schema that it uses, it would be defined in these docs but it’s not as of this moment.
1 Like
Hey @SeanieB1983 There isn’t a liquid variable (as far as I know) for the product category to include in your product template. I think it’s only available using the API so it’s not something you can “just pop in” to your product template.