Mobile app version of vmapp.org
Login or Join
Holmes151

: Will AggregateRating markup that is generated dynamically by client side JavaScript show stars on Google search? Google show stars in Google search with JavaScript dynamically generated rich snippets?

@Holmes151

Posted in: #Javascript #Microdata #RichSnippets

Google show stars in Google search with JavaScript dynamically generated rich snippets?

I'm thinking about starting a widget that my users will put in their website. My widget will generate rich snippets in order to allow Google show stars on Google search.

I know that rich snippets work when they are put in static HTML. Can they be dynamically generated via JavaScript as well?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Holmes151

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

Google says that they can read dynamically added structured data if the JSON-LD syntax is used:


Also, Google can read JSON-LD data even when it is dynamically injected into the page's contents, such as by Javascript code or embedded "widgets".


They don’t document this for the other syntaxes they support (Microdata, RDFa), but this doesn’t necessarily mean that they can’t/won’t read it.

10% popularity Vote Up Vote Down


 

@Merenda212

I tested now and it didn't work.

In general Google can process JavaScript just fine, but considering these should be static tags it probably considers it doesn't comply with standards and ignores them (if printed with JavaScript).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme