Important Points to note to activate Web Push Notification or PWA on your AMP pages.
- Your AMP page must pass in validation.
- Your site must be on https.
To integrate AMP PWA / Web Push, you will need to add some files to your root folder.
Go to following link (https://push.notifyvisitors.com/brand/webapp/manifest) to configure and download the package.
On downloading the package, you should have the following files :
1.Add manifest and script in head of the AMP pages.
<meta name="theme-color" content="#000"> <link rel="manifest" href="https://yoursite.com/notifyvisitors_push/chrome/manifest.json"> <script async custom-element="amp-install-serviceworker" src="https://cdn.ampproject.org/v0/amp-install-serviceworker-0.1.js"></script>
2. Add this AMP tag in body and replace "`yoursite.com`" with your domain.
<amp-install-serviceworker src="https://yoursite.com/service-worker.js" data-iframe-src="https://yoursite.com/notifyvisitors_push/amp/install-serviceworker.html" layout="nodisplay"> </amp-install-serviceworker>
Updated about a month ago