- Google Tag Manager
- Server-Side Rendering
Google Tag Manager
Follow these 6 steps to generate structured data with Google Tag Manager
- Install and set up GTM on your website
- Insert a new custom HTML tag to the container
- Put all the desired structured data block into the tag content
- Install the container as specified in the Install Google Tag Manager section
- Publish your container in the Google Tag Manager system to add the tag to your website.
- Test your execution.
- Search for the type of structured data you are interested in
- Finally, Test with Rich results test
Google Documentation recommends doing the testing with Rich Results Test because it does two things at once:
- Check the validity of the structured data
- Tests for rich results eligibility
Google also has a structured data testing tool that only checks if the given structured data is valid and does not provide feedback about rich results. Rich Results test, therefore, does two things at once as it shows structured data eligibility and the warnings and errors. There are only two ways to test structured data-
- By entering the URL to make Google crawl the page and find out the structured data and then test it.
- Directly input the code
Google highly recommends using URL input rather than using code input.