- Google Tag Manager
- Server Side Rendering
Google Tag Manager(GTM)
Google lists six steps to generate structured data dynamically with GTM:
- ‘’Set up and install Google Tag Manager on your site.
- Add the new Custom HTML tag to the container.
- Paste the preferred structured data block within the tag content.
- Install the container as displayed on the Install Google Tag Manager section of the admin menu of your container.
- For adding the tag to your site, publish your container in the Google Tag Manager interface.
- Test the implementation.
- Look for the type of structured data that you are interested in.
- Test With the Rich Results Test
The Google documentation only says that you should test it with Rich Results Test probably since it does two things simultaneously:
- Testing the eligibility of rich results
- Verify if the structured data validates
Google also has a Structured Data Testing Tool which tests if the structured data is valid. However, it doesn’t feedback about rich results.
The Rich Results testing tool shows warnings and errors and also displays whether the structured data is suitable for rich results. There are two ways of testing structured data in Google’s Rich Results Test. The first way is by inserting a URL so that Google crawls the page and extracts structured data and performs data. The second way is to input the code directly.