I was trying to add schema.org markup for our "contact us" page. But Shopify is adding extra characters to the original code.
The right code should be:
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
Shopify converts it to:
<div itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
There's an extra [=""] to itemscope
It also stripped out the <link itemprop="sameAs"> lines and the <span itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates"> declaration.
I used the HTML editor.
Hope someone who has experienced this can provide a fix.
This is a common issue with html editors.
The extra ="" should be no issue,but removing itemprops is.
This would be something Shopify would have to fix.
You may be able to add your details using json-ld instead of microformat. That is data placed in a <script> tag which may not get removed.
Googles documentation for LocalBusiness markup (come to a search engine near you soon) provides a good example of the markup you can use, and Google wants. Just replace the details with what matches your business, then add it to the page and test it with the Google Structured Data Testing Tool:
The markup itself is not visible, but it should represent content that is.
Not long ago, microdata markup using meta tags was against the rules. At this time it seems it is ok, but the content it includes has to be visible some where else on the page. I still recomend marking up the visible content (or use json-ld) to remove ambiguity and the risk that Google decides it is deceptive markup.
schema.org just defines a data structure (schema) on how to define your information. They don't care how you do it.
It's the data readers like Google that read it and need to decide how trustworthy it is. I personally believe they will have a sliding scale, like a percentage, of trust.
Visibility is a core quality/trust signal for Google:
Markup should not be used to hide content not visible to users in any form, since it might create a misleading or deceptive search experience. For example, if the JSON-LD markup describes a performer, the HTML body should describe that same performer.
But they have more, that they don't tell us about.
I beleive its always a good move to try and help search engines as much as possible. For them to determine that meta data content is also in the visible content is hard, and why they did not support it before. So best to mark up the visible content and automatically have that box ticked.