All Collections
Frequently Asked Questions - FAQ's
AMP
Why is my Javascript not working in AMP pages?
Why is my Javascript not working in AMP pages?

In the article, we explain why you cannot have custom javascript in AMP pages.

siddarth avatar
Written by siddarth
Updated over a week ago

Custom Javascript is not allowed in AMP pages unless it is AMP compliant. It is one of the restrictions of the AMP framework. That's is one of the reasons why an AMP page is very fast. Please do note that in some cases the custom code will work, but the page published will not be a valid AMP page. Only valid AMP pages are served through Google CDN so its important that your landing pages are AMP validated, you can check this here . If the custom javascript is a must, I recommend you to use Standard pages as its more versatile and allows customizations. You can create a Standard version of the your AMP landing page using the "Create Standard Version" option


โ€‹
โ€‹

Did this answer your question?