--- title: "Using the web SDK with AMP" slug: "web-sdk-for-amp-pages" updated: 2026-06-09T22:30:33Z published: 2026-06-09T22:30:33Z canonical: "docs.xtremepush.com/web-sdk-for-amp-pages" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt > Use this file to discover all available pages before exploring further. # Using the web SDK with AMP Guide to implement the Xtremepush SDK on AMP pages AMP, or Accelerated Mobile Pages, is a Google-backed project that uses a stripped down and lightweight version of HTML to allow for faster content for mobile users. The following guide will show you how you can subscribe to push notifications using the Xtremepush web SDK on an AMP page. You must be able to host the necessary files on your HTTPS-enabled website. ## Add the web-push plugin In the page `HEAD` include the AMP web-push script: ```xml ``` Add the following to the page `BODY`, replacing `YOUR_DOMAIN` with your actual website domain to reference the files you will add next: ```xml ``` ## Add required files Now we need to add the various files referenced above. ### helper-frame.html This is the page we will be adding the Xtremepush SDK integration code. So you will need to grab that from the SDK integration section on the Xtremepush platform. Your code will look like the following: ```xml ``` ### permission-dialog.html Add the following as an HTML file to your root directory: ```xml      
   
``` ### service-worker.js Add the service worker code found on the SDK integration page by navigating to **Settings > Apps & sites >** click on the matching website **> Push Settings**. Find an example of the code below. > [!NOTE] > **The script for the service worker file will only be shown in Push Settings if you have selected the Use Self-hosted Domain option, but the service worker is required for AMP integration.** ```javascript importScripts(decodeURIComponent(  location.search.substring(location.search.indexOf('ref=')+4) )); ``` ## Prompting If auto-prompting is disabled, you can prompt the user from your AMP page by calling `tap:amp-web-push.subscribe`. For example, a button with that action: ```xml ```