#226 – How to add Structured Data JSON Schema

Posted in ‘weeblrAMP’
This is a public ticket. Everybody will be able to see its contents. Only enter usernames, passwords or any other sensitive information in the Private information field.
Tuesday, 30 June 2020 13:38 UTC
thaimed
 Hi im wondering is what is the recommended/ best way to add structured data to WeeblrAMP site?
Normally use google tag manager but the amp container does not allow "custom html"

I also cannot add the code to header as its javascript <script> (not allowed)

What is the. best way?

Thank you!
Tuesday, 30 June 2020 14:23 UTC
wb_weeblrpress
Hi,

First please note WeeblrAMP already add quite a number of structured data to your pages (see settings under the SEO tab) - especially when using WooCommerce, the SD implementation is quite extensive.

Second, please also note that there's little use to add structured data to AMP pages, because they are not canonical. So their content and structured data will NOT be used for ranking by search engines (they may for indexing but again, they are not canonical)
The structured data implementation we have is really meant for sites that chose to be "Standalone AMP", that is they do not have an HTML version, only an AMP version.

So if you want to add structured data to some pages, the best way is to use a the weeblramp_get_jsonld_data filter. You will receive an array with the structured data WeeblrAMP computed already and you can then modify them or add more as you see fit.

You can see here how to add filters to AMP pages.

Best regards
 
Wednesday, 01 July 2020 04:51 UTC
thaimed
Hi thank you for the prompt response again.. case closed
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.