Google has posted a new developer help document guiding SEOs and webmasters on how to use structured data with JavaScript. This goes through using Google Tag Manager to generate JSON-LD dynamically and using structured data with custom JavaScript.
The document explains that modern websites use JavaScript to create websites with lots of dynamic content. There are a few things you need to look out for when using JavaScript to generate structured data on your websites, and this guide covers best practices and implementation strategies. If youโre new to structured data, you can learn more about how structured data works.
There are different ways to generate structured data with JavaScript, but the most common are:
- Google Tag Manager
- Custom JavaScript
๐New documentation! ๐
— Martin Splitt at ๐ก๐จ๐ญ (@g33konaut) April 3, 2020
Whoop whoop, our new guide on using JavaScript to generate structured data are out: https://t.co/q9442HXCvn
Let us know what you think โ๏ธ pic.twitter.com/x58T8YLv0a
This document has some very nice guidance that I know some in the SEO community wanted clarity on.
Forum discussion at Twitter.