AMP Web Push

Implement web push notifications on AMP web pages

AMP pages support mobile web pushes on Android devices only.


AMP is an open-source Google framework for developing user-first web pages loading nearly instantaneously.

Integrating the AMP Web Push component into your AMP web pages, you can reach out to your customers when they’re surfing the web on their mobile browsers.

Integrate AMP into your website

Add the following files to your website’s root directory:

There are two customizable blocks in the permission-dialog.html file:

Subscribe to push notifications
<div permission="default">
<p class="message">
{Subscribe to push notifications}
Unblock push notifications
<div permission="denied">
<p class="message">
{Unblock push notifications in your browser settings}


  • {Subscribe to push notifications} — a CTA message asking users to allow push notifications;

  • {Unblock push notifications in your browser settings} — a CTA message prompting users to unblock push notifications in their browser settings (in case push notifications are explicitly blocked by a user).

Integrate AMP Web Pushes

To implement web push notifications on AMP pages, add the amp-web-push component to each AMP page.

To do so, follow these two steps:

1. Add the following script to the <head> tag:

<script async custom-element="amp-web-push" src=""></script>

2. Add the following code to the <body> tag:

<!-- Start Subscribe to notifications button -->
<amp-web-push-widget visibility="unsubscribed" layout="fixed" width="250" height="80">
<button class="subscribe" on="tap:amp-web-push.subscribe">
{Text on Subscribe button}
<!-- End the Subscribe to notifications button -->
<!-- Start Unsubscribe from notifications button -->
<amp-web-push-widget visibility="subscribed" layout="fixed" width="250" height="80">
<button class="unsubscribe" on="tap:amp-web-push.unsubscribe">
{Text on Unsubscribe button}
<!-- End Unsubscribe from notifications button -->
<!-- Start Fallback if a user blocks notifications -->
<amp-web-push-widget visibility="blocked" layout="fixed" width="250" height="80">
<div class="fallback">
{Fallback if a user blocks notifications}
<!-- End Fallback if a user blocks notifications -->


  • {domain} — your website URL,

  • {applicationCode} — your Pushwoosh app code,

  • {senderId} — Sender ID from your Firebase console,

  • {applicationServerKey} — Server Key from your Firebase console,

  • {Text on Subscribe button} — a text on a button enabling push notifications,

  • {Text on Unsubscribe button} — a text on a button disabling push notifications,

  • {Fallback if a user blocks notifications} — a fallback block that is displayed when a user blocks push notifications.

To customize buttons’ style, add the following code to the <head> tag:

<style amp-custom>
amp-web-push-widget button.subscribe {
/* your css here */
amp-web-push-widget button.unsubscribe {
/* your css here */
amp-web-push-widget .fallback {
/* your css here */

To check whether you’ve done everything right, please use