0

My webstore uses Kudobuzz for product reviews, but our e-commerce platform (PDG) isn't supported for SEO markup data.

This widget does not support schema markup on it's own, so I want to somehow select the relevant pieces and inject the schema markup to the various divs/spans that make up the widget. One problem is figuring out how to inject code that google can parse, and another is figuring out how to make the actual selectors for this super bloated widget.

Here is a codepin of the widget and some markup data that is already on the site: http://codepen.io/anon/pen/GpddpO

Here is a link to a product page if you want to see how everything works: https://www.asseenontvhot10.com/product/2835/Professional-Leather--Vinyl-Repair-Kit

This is (roughly) the markup I'm trying to add if it helps:

<div itemscope itemtype="http://schema.org/Review"> 
<div itemprop="reviewBody">Blah Blah it works 5 star</div> 
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
Written by: <span itemprop="name">Author</span></div>
<div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Thing">
<span itemprop="name">Stop Snore</span></div>
<div><meta itemprop="datePublished" content="2015-10-07">Date published: 10/07/2015</div>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="1"><span itemprop="ratingValue">5</span> / <span itemprop="bestRating">5</span> stars</div>
</div>
  • I have no idea what to try, I know html and css. I've got no idea where to start except that someone told me it was possible to use jQuery to select pieces of code and inject html. – S. Lourcey Oct 07 '15 at 18:54
  • How is the schema structured? You need to provide some more info... we shouldn't need to use the plugin to offer you a solution – An0nC0d3r Oct 07 '15 at 19:02
  • Are you aware that most consumers wouldn’t parse Microdata/RDFa if it’s injected with JavaScript? Google, for example, [supports this only for JSON-LD](http://stackoverflow.com/a/29066759/1591669). – unor Oct 07 '15 at 19:10
  • Oh man, so is there any solution here if the widget doesn't support it? – S. Lourcey Oct 07 '15 at 19:24
  • you can create an escaped fragment that you get search engines to crawl instead, which is basically a static copy of your page, as long as the data doesn't need to include instant changes it should be ok, google's documentation explains escaped fragments well, it's just a case of adding a meta tag to the header. – Mousey Oct 16 '15 at 16:21
  • http://softwarerecs.stackexchange.com may know of a widget that since we don't do recommendations here includes microdata, is it for wordpress? I'd be interested in one for javascript or jquery reviews – Mousey Oct 16 '15 at 16:24

1 Answers1

0

Theoretically you could write a very small amount of microdata using css :before and :after - with content but it would need all spaces and symbols converted into ISO format, eg.

#name:before { "\003cspan\2002itemprop\0022name\2033"} #name:after { content: "\2044\003cspan003e"

even spaces need to be substitued with \2002 or an equivalent whitespace code

should wrap this microdata to your HTML to any element called name:

<span itemprop="name">...</span>

Clearly this can only work if the widget lets you have clear ids or class names for the elements added, and it may be useless you know the type of object reviewed first (eg Book, Movie, since this needs to go at the start in the example I gave - which is incomplete). The code would need to be nested correctly so if you want further help can you edit your question with example HTML for a completed review.

Writing your own JSON-LD script at the top of the page is another option - it would be a different question (if you get stuck) but isn't embedded within the data itself

Edit

it's a good idea to test the css in a separate environment first, eg setup a jsfiddle

Mousey
  • 1,855
  • 19
  • 34
  • I updated the question and added a link to the codepin I made. Any help you could offer would be greatly appreciated! I don't think anyone has ever successfully done this, but it could be a huge boon to a lot of people with similar setups. As a sidenote, is there anything to convert unicode to ISO? – S. Lourcey Oct 28 '15 at 17:14