New official Google advice on generating structured data with JavaScript

Apr 3, 2020 | Search Engine Optimization News




Google has released a new developer document with advice on generating structured data with JavaScript. It offers more direction on this topic, something SEOs have been seeking for a while from Google. Previously, SEOs, and sometimes even Google, cautioned to shy away from using structured data in JavaScript.

Applications. Google said, “There are different ways to generate structured data with JavaScript, but the most common are using Google Tag Manager and custom JavaScript.” Google Tag Manager is a platform that allows you to manage tags on your website without editing the code. Here is Google’s advice on both methods.

Google Tag Manager. Follow the steps below to add structured data via Google Tag Manager.

  1. Set up and install Google Tag Manager on your site.
  2. Add a new Custom HTML tag to the container.
  3. Paste the desired structured data block into the tag content.
  4. Install the container as shown in the Install Google Tag Manager section of your container’s admin menu.
  5. To add the tag to your website, publish your container in the Google Tag Manager interface.
  6. Test your implementation.

Custom JavaScript. You can use JavaScript to generate all of your structured data or use it to add more information to server-side rendered structured data, Google said.

new-official-google-advice-on-generating-structured-data-with-javascript New official Google advice on generating structured data with JavaScript

Learn more. We highly recommend you read the full help document over here.

Why we care. For some sites, the only way to add structured data is to use JavaScript. Sometimes using Google Tag Manager can help efficiently manage that structured data. Please use Google’s official advice when implementing structured data through JavaScript.


About The Author

new-official-google-advice-on-generating-structured-data-with-javascript New official Google advice on generating structured data with JavaScript
Barry Schwartz a Contributing Editor to Search Engine Land and a member of the programming team for SMX events. He owns RustyBrick, a NY based web consulting firm. He also runs Search Engine Roundtable, a popular search blog on very advanced SEM topics. Barry’s personal blog is named Cartoon Barry and he can be followed on Twitter here.

Source

WordPress Development

SEO NEWS

seo news

We’re listening.

Have something to say about this article? Share it with us on Facebook, Twitter or LinkedIn:

SHARE IT HERE:

Subscribe ToThe Weekly SEO Trade News Updates

Get the latest SEO, SEM and SMM marketing intel, tips and tricks from one of the best SEO Gurus online. 

Every Tuesday morning we send out an aggregated email listing all new posts on SEO Trade News.

Excellent! Now check your email to confirm your subscription.