Schema.org - Google Merchant Center
This is an update for all the people like me out there is Spark Pay land that are having issues with Rich Data Snippets for Google. Since Google as I am told by Google is getting stricter at enforcing the correct layout of the Schema.org MicroData I thought I would post this to save everyone else the headaches that I have just been through for the past two weeks. And just so you know – if your product data is not showing correctly in your Google Merchant Center it can and will affect the serving of your ads on Google Shopping. And as an extra added bonus (that only Google could give us) don’t trust the Google Markup Tester as Google themselves told me it is not catching the new requirements that they are enforcing – so if it says All Good there’s a strong chance it’s not.
So here is the beginners guide to fixing the data yourself.
So let’s go to Themes-> Click on the “Edit” button of your active theme -> Expand the “Pages” and look for your Product Detail Page – Click on it and then click on HTML Editor.
(This is always a good point to copy the entire page and save it in a note pad file like I do…just in case of an oops)
The data you will need to look at and edit should be contained in a couple of different sections of your product detail page let’s call them “Snippet Areas”. The first Snippet Area should be placed or found about ¼ the way down the page after all the styling and usually after this:
<script type="text/javascript" src="/store/inc/ac_modal.js"></script>
##SET[CatalogPage=True]##
This is where you can find the first part of the Product Snippet Area and it will look like this or cut and paste this in:
<!-- BEGIN Schema.org Product Rich Snippet Markup -->
<div itemscope="" itemtype="http://schema.org/Product">
<meta itemprop="category" content="##CATNAME##">
<meta itemprop="mpn" content="##MFGPARTNUMBER##">
<meta itemprop="name" content="##PRODUCTNAME##">
The merge codes work for all of us on the Spark Pay platform just the same. As you can tell this deals with the category, manufacturer, part number and the product name.
You don’t want to get into GTIN (UPC numbers if you don’t have to) as there are certain specifications for 8, 12 or 14 digit UPC’s so let’s avoid those if you can.
Next section is your Price “Snippet Area” This is where you will declare the currency, price, availability and condition of the product.
Look for this:
<ac:visibilityarea id="PricingArea">
Below this area is generally where all the pricing for the product goes depending on your theme or style but I believe they are all about the same. Then you are going to need to add the following, cut this, paste this or if you have it edit this, so it looks like this:
<div id="dvProductPricing" class="ProductDetailsPricing" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<meta itemprop="seller" content="##STORENAME##">
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition">
<link itemprop="availability" href="http://schema.org/InStock">
<meta itemprop="priceCurrency" content="USD">
<meta itemprop="price" content="##RAWPRICE##">
We all know the merge codes so we can pretty much tell just from looking at this what this is. The only fields that are total unique are the schema.org/offer….InStock….NewCondition.
But I believe you should be able to cut and paste this into the section and be good to go.
You can also add reviews to your Schema.org Snippet Area. However, they get a bit more complicated of how and where to place them. I am sure one of the Spark Pay Guru’s could assist you but it’s not something I feel comfortable trying to explain, nor do I believe it is really required by Google and/or Schema.org to display them. It’s not required in order to do the Automatic Item Updates on Price and Availability in Google Merchant Center (for your Google PLA’s) which is what this post is about in the first place. But it’s good to have regardless so you might want to investigate it.
Now after almost 2 weeks my Merchant Account Center has finally accepted Automatic item updates for both Price and Availability so I KNOW this formula up above works!!!!!
Hope this helps someone!!!
Paul - TheCandylandStore.com
-
Thank you Paul! This is very helpful.
4 -
Great information Paul.
2 -
I did exactly as you showed and I'm getting errors when checking with G's Structured Data Test... here's one error... any ideas?
http://schema.org/NewCondition (The property Offer/itemCondition is not recognized by Google for an object of type Offer.)0 -
I'm not sure but I think I found a problem... I was copying the format offered by google here: https://support.google.com/merchants/answer/6069143?hl=en (open the schema.org microdata example)
It shows EVERY instance of itemscope to be a standalone word (not followed by an empty value), and is followed by the itemtype tag.
When I tried to fix my code this way, the editor changes it.
Example - I entered this in the editor:<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
After saving, it looked like this:
<div itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
I'm wondering if this is partly why I'm getting errors trying to validate. :(0 -
schema.org and the w3c also show itemscope without the ="" after it.
https://schema.org/docs/gs.html
https://www.w3.org/TR/microdata/
In fact, I've done a ton of reading trying to get this right, and have not seen itemscope="" ANYWHERE.
How can I stop the editor from mutilating this code???0 -
I've finally gotten rid of the errors but still getting warnings in google shopping... One is because of the dollar sign in the price... I know there's a RAWPRICE merge code, so that's what G needs, but I do want my customers to see the dollar sign. Here's what G says about the price snippet :
http://schema.org/price Price This field should only contain the price value. The price should be a number without separators between thousands or spaces (e.g. '8.99') I could modify the heck out of the price area to get this right, but I think I'm just going to go through the code and remove all the tags, then add a div at the bottom of the description with the tags the way G wants them. I don't see an easier way to fix this.
1 -
Kathy
"I know there's a RAWPRICE merge code, so that's what G needs, but I do want my customers to see the dollar sign."
Leave the pricing code that is currently in the html, then add this just below it:
<meta itemprop="price" content="##RAWPRICE##">
meta tags do not display to the customer, but are visible to google.
Hope this helps.
--Austin
SPOS Support
0 -
Austin :
"
Leave the pricing code that is currently in the html, then add this just below it:<meta itemprop="price" content="##RAWPRICE##">
"I tried that already - over a week ago. I'm still getting warnings about the price. When I test it with G's tool, it sees both price fields - the one I made is fine, the other one is throwing the warning.
I still think for simplicity's sake, I'm going to remove all the snippets, then add my own snippet section at the bottom of the page, just after product description, complete with visible-on-the-page info ("in stock", price, etc.). This also makes it easier for me to tweak the code as I learn more about how G wants things.0 -
Kathy,
Let me clarify: remove the itemprop code from the existing merge code, but leave the pricing merge code. then add the meta tag, so that you only have one pricing itemprop.
--Austin
SPOS Support
0 -
Thanks Austin. I just now saw your reply.
I ended up doing what I said I'd do, and Google is now happy. I may re-visit the issue at a later date, but for now this is working :
"... remove all the snippets, then add my own snippet section at the bottom of the page, just after product description, complete with visible-on-the-page info ("in stock", price, etc.). "0 -
Is anyone else having problems when using product groupings with Google merchant center disapproving your products due to "incorrect prices" in the feed? When you create a group and have the parent as info only, when google crawls the site for the products in the feed, it comes to the parent page, not the individual product pages. So, the price it sees is the parent price, not the actual product prices listed below. That is causing errors by google seeing a different price than in the feed on that page. I'm not sure how to rectify this. I don't know if adding the raw data price to each individual row of products in the table would confuse google or cause more errors. Can anyone shed light on this?
1 -
tnovak - I don't use groups, but can you not mark the parent as GoogleExclude = TRUE and submit just the individual items? Or are you wanting to show the group on Google with the group price?
If the latter, this is what I do - I just make a new item that IS the group. You could always add the individual items as "related items". Again, I've never used groups on the cart, so maybe this isn't close enough to what you need.0 -
Kathy, I already do that so the individual items are only submitted in the feed. However, the problem lies in when google crawls the URL the cart redirects the page to the parent item of the site. So when it goes to that page, it sees the item price at whatever the parent is, not the individual items on the page. I thought about putting the raw price in the output table of the child items, but then you would have more than one price on the page and that would really be bad. I completed the changes in this post last week and now I just checked one of my stores and got this warning in my diagnostics: Insufficient match of microdata price information. 74% of crawls within the last 7 days had a price mismatch.
Now I have to go back and figure out how to fix this before I lose all my products that are grouped in the feeds. Can anyone at Sparkpay please chime in on this issue and see how to correct it?
0 -
Tnovak:
If I am following what is happening, this may be the solution... Showing multiple products on a page is a common scenario for Google and when they crawl the page if the crawler knows to check for it, it will pull individual prices. The caveat is that the individual identifier for the product needs to be associated to the child items, and our themes don't do that by default.
Here is some code I put together for a site a while ago that might help.
It associates the Item ID to the child items and the itemprop to the price.
The Item ID column is hidden with in line styling so it doesn't disrupt the look of the grouping table. The code may need to be modified, but the important part is the "Item ID" and the "Price" lines. Unless your product details HTML is already heavily modified, you should be able to fit it in. (Be sure to make a backup of the code to be safe)
<ac:visibilityarea id="ProductGroupArea">
<div id="dvProductGroupGrid" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<ac:visibilityarea id="ProductGroups">
<div id="divProductDisplay" class="overflow-x-scroll">
<table class="ProductGroup table">
<thead>
<tr class="ProductGroupHeader no-wrap">
<th id="thProductGroupDisplayItemNumber" style="display:none;">Item ID</th>
<th id="thProductGroupDisplayItemNumber">Item #</th>
<th id="thProductGroupDisplayDescription">Description/Size</th>
<!-- <th id="thProductGroupDisplayAvailability">Availability</th> -->
<!-- <th id="thProductGroupDisplayPriceBreaks">Qty Break</th> -->
<th id="thProductGroupDisplayPricing">Price</th>
<th id="thProductGroupDisplayQuantity">Quantity</th>
</tr>
</thead>
<ac:layoutarea id="ProductGroupDetail">
<tr class="ProductGroupItem">
<td class="tdProductGroupDisplayItemNumber" itemprop="sku" style="display:none;">##ITEMID##</td>
<td class="tdProductGroupDisplayItemNumber">$$ITEMNR$$</td>
<td class="tdProductGroupDisplayDescription">$$LONGDESCRIPTION$$</td>
<!-- <td class="tdProductGroupDisplayAvailability">$$AVAILABILITY$$</td> -->
<!-- <td class="tdProductGroupDisplayPriceBreaks">$$QTYBREAKS$$</td> -->
<td class="tdProductGroupDisplayPricing" style="white-space:nowrap;" itemprop="price">$$PRICE$$</td>
<td class="tdProductGroupDisplayQuantity">$$QUANTITY$$$$ADDTOCART$$</td>
</tr>
</ac:layoutarea>
<ac:layoutarea id="ProductGroupDetailAlt">
<tr class="ProductGroupAlternatingItem">
<td class="tdProductGroupDisplayAltItemNumber" itemprop="sku" style="display:none;">##ITEMID##</td>
<td class="tdProductGroupDisplayAltItemNumber">$$ITEMNR$$</td>
<td class="tdProductGroupDisplayAltDescription">$$LONGDESCRIPTION$$</td>
<!-- <td class="tdProductGroupDisplayAltAvailability">$$AVAILABILITY$$</td> -->
<!-- <td class="tdProductGroupDisplayAltPriceBreaks">$$QTYBREAKS$$</td> -->
<td class="tdProductGroupDisplayAltPricing" style="white-space:nowrap;" itemprop="price">$$PRICE$$</td>
<td class="tdProductGroupDisplayAltQuantity">$$QUANTITY$$$$ADDTOCART$$</td>
</tr>
</ac:layoutarea>
</table>
<ac:visibilityarea id="UpdateGroupPrice">
<br>
<div align="right" class="ProductDetailsPricing">
$$PRODUCTGROUPTOTAL$$
</div>
<div align="right" class="ProductGroupUpdatePrice">
$$PRODUCTGROUPUPDATEPRICE$$
</div>
<br>
</ac:visibilityarea>
</div>
<div class="right ProductGroupAddToCart">$$PRODUCTGROUPADDTOCARTBUTTON$$</div>
</ac:visibilityarea>
</div>
</ac:visibilityarea>1 -
I've created a new product detail layout template for these products and am testing a few out that I see in my google account that have been disallowed. I will post back here once I see if their status changes.
Thanks very much for your fast response.
0 -
Tnovak:
Were you able to make any progress on with your new layouts?
I'm having issues with Google reading our product pages properly too. We use a product grouping setup similar to you.Michal:
Your code was helpful, thank you. It seems to test well using the Google Structured Data Testing Tool, but when Google Merchant crawls it says 'Missing or invalid schema.org microdata for price'.
Any help would be appriciated, thanks all.0 -
Will, I just tested the code above on a page with a product grouping and ran a test, getting errors. Here is how I fixed so I get no errors or warnings now.
Instead of using this code for the item price:
<td class="tdProductGroupDisplayPricing" style="white-space:nowrap;" itemprop="price">$$PRICE$$</td>
I simply added this code after that line (removing the itemprop="price" from it of course):
<meta itemprop="price" content="##RAWPRICE##">
You're also going to need to add the currency to the offer tag like so.
<div id="dvProductGroupGrid" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<meta itemprop="priceCurrency" content="USD">I used the code examples above and made the two changes noted and ran a test and it worked flawlessly. Now to see if google will pass it. Will post back once I hear from them.
0
Please sign in to leave a comment.
Comments
17 comments