Skip to content

PWA vs native app for your store: when the web is enough

Guide/ 14 min read

What a PWA can do today on Android and iPhone, when a native app is worth paying for, and how to measure installs and launches in GA4, with code tested in Chromium.

  • Performance
  • JavaScript
  • Analytics
In this article (7)
  1. What a PWA is and what it can do today
  2. When a PWA is enough for an online store
  3. When a native app is worth it
  4. How to measure whether your PWA gets installed and used
  5. Common mistakes
  6. Frequently asked questions
  7. Checklist

If shoppers find you through Google, ads or social and buy now and then, a PWA is enough: it installs from the browser, still answers offline and, since iOS 16.4, gets push notifications once added to the Home Screen. A native app pays off when customers reorder often or you need native-only features such as Live Activities.

Below: what Google, Apple and MDN say about each platform, when an app is worth it, and the minimum code (manifest, service worker and GA4 measurement) we tested in Chromium 151, with the real output.

What a PWA is and what it can do today

The web.dev Learn PWA course defines a PWA as a web app that uses progressive enhancement to be more reliable, uses new capabilities to integrate with the operating system, and can be installed. For a store, that is three pieces on top of the site you already run:

  • HTTPS. Service workers and almost every API here only work in secure contexts; during development, localhost and 127.0.0.1 count as secure.
  • A manifest: name, icons, start URL and display mode (MDN: web app manifest).
  • A service worker: a script between the page and the network that decides what to answer. It gives you the offline page and push.

For Chrome to offer installation, web.dev's criteria ask for HTTPS and a manifest with short_name or name, 192 px and 512 px icons, start_url, a valid display (standalone, for example) and prefer_related_applications missing or false; the user also has to have tapped the page and spent 30 seconds on it. A service worker is no longer on the list: Chrome dropped that requirement for installing from the menu as of version 108 on Android and 112 on desktop. In our test, Chromium 151 flagged no installability errors without one. You still want it: without it there is no offline mode and no push.

What differs between platforms is what happens next:

CapabilityAndroid (Chrome)iPhone and iPad (Safari)
InstallFrom the menu, or from your own button using beforeinstallpromptManually: Share > Add to Home Screen. Since iOS 26, every site added opens as a web app unless the user turns it off
PushPush API with a service worker and the user's permissionSince iOS 16.4, only for Home Screen web apps; since 18.4, Declarative Web Push too, with no service worker
Icon badgeBadging API in the installed appBadging API since iOS 16.4, in Home Screen web apps
OfflineService worker and Cache StorageService worker and Cache Storage
Install eventappinstalledNone
App storeGoogle Play, through a Trusted Web ActivityApp Store, under Apple's review rules

The iPhone rows come from the WebKit blog: push and the Badging API in iOS 16.4 (February 16, 2023), Declarative Web Push in iOS 18.4 for web apps added to the Home Screen and the iOS 26 change. In the 16.4 post, WebKit explains that the icon launches a web app when the manifest's display is standalone or fullscreen; since iOS 26 that is the default. The Android rows come from web.dev and the Trusted Web Activity docs. MDN marks beforeinstallprompt, appinstalled and the Badging API as limited availability.

PWA vs native app: what changes for a storefor your storePWAnative appinstalls fromthe browserApp Store / Google Playfirst purchaseat a URL, no installafter downloading the apppush on iPhoneiOS 16.4+, Home Screenyes, with permissionofflineservice workerwhatever you buildLive ActivitiesnoActivityKiteach changelive when you deploynew build + App Reviewthe PWA lives on your domain; the app in a storeweb push on iOS: only for web apps added to the Home Screen (WebKit)

Scroll the figure sideways to see all of it

When a PWA is enough for an online store

Your online store already is a web app: catalog, cart and checkout run in the browser. A PWA adds an icon, an answer when there is no network and, if the shopper agrees, notifications. Our rule of thumb: it is enough when most of this holds.

  • Shoppers arrive from Google, ads or social and buy on the first or second visit. The URL is what matters there; asking people to download an app before they buy adds a step.
  • People reorder every few months, not every week.
  • Notifications are a bonus, not the core of the business.
  • You need no operating-system-only features, and you have one team: the web team.

Two limits. A service worker does not speed up the first visit: per web.dev, every request on it goes straight to your server because the worker does not control the page yet. If the hero image is slow, see how to make your hero image load first. And a PWA does not fix an awkward mobile checkout; that takes autocomplete and the right keyboard for every field.

Check your platform too. The service worker is served from your own origin and its default scope is the file's folder (MDN: register()): to control the whole store, /sw.js sits at the domain root or the server sends Service-Worker-Allowed. If your platform will not let you publish that file, do not go headless just for this; read when headless is not the answer first.

The manifest

{
  "id": "/",
  "name": "Tienda Demo",
  "short_name": "Demo",
  "start_url": "/?source=pwa",
  "scope": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#151412",
  "icons": [
    { "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png" },
    { "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png" }
  ]
}
  1. id is the app's identity. Per MDN, when it is missing start_url is used, and a different id counts as a different app. Setting it lets you change start_url without creating a new app.
  2. name and short_name: the full name and the one that fits under the icon.
  3. start_url opens the store with ?source=pwa, the marker we will measure.
  4. scope says which URLs belong to the app; with "/", the whole store.
  5. display: "standalone" opens the app in its own window, with no address bar.
  6. background_color is the background before the CSS loads; theme_color is the color the system uses around the app.
  7. icons: the two sizes Chrome asks for, as PNG.

Link it in the <head> of every page with a <link rel="manifest"> tag pointing to /manifest.webmanifest, and serve it as application/manifest+json, the type MDN gives.

The service worker: shell from the cache, HTML from the network

const CACHE = "shell-v1";
const SHELL = ["/offline.html", "/app.css", "/icons/icon-192.png"];

self.addEventListener("install", (event) => {
  event.waitUntil(caches.open(CACHE).then((cache) => cache.addAll(SHELL)));
});

self.addEventListener("activate", (event) => {
  event.waitUntil(
    caches.keys().then((keys) => Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))),
  );
});

self.addEventListener("fetch", (event) => {
  const { request } = event;
  const url = new URL(request.url);
  if (request.mode === "navigate") {
    event.respondWith(fetch(request).catch(() => caches.match("/offline.html")));
  } else if (request.method === "GET" && url.origin === location.origin && SHELL.includes(url.pathname)) {
    event.respondWith(caches.match(request).then((hit) => hit || fetch(request)));
  }
});
  1. CACHE is the versioned cache name: bump it to shell-v2 when these files change.
  2. SHELL is the app shell: offline page, CSS and one icon. No products, no cart.
  3. On install, waitUntil waits for cache.addAll, which stores everything as one transaction: if one file fails, you are not left with half a cache.
  4. On activate, caches with any other name are deleted, so a new version does not leave the old one taking up space.
  5. Navigations go to the network first; only when it fails is offline.html served. That is the Network First strategy from web.dev, minus storing each page's HTML: nobody sees a stale price or stock level as if it were current.
  6. Shell files, fetched with GET from your origin, come from the cache first (Cache First).
  7. Everything else (the cart API, checkout, third-party scripts) is left alone: without respondWith, it goes to the network as if there were no service worker.

Register the service worker

if ("serviceWorker" in navigator) {
  navigator.serviceWorker.register("/sw.js");
}
  1. The check avoids an error in browsers without support, where the store keeps working as before.
  2. register("/sw.js") from the root covers the whole store. The first visit installs it, and the page is controlled from the next load.

When a native app is worth it

A native app pays off when customers already come back without you paying for an ad, and you need something the web cannot give you. These are the signals we look for:

  • Frequent reorders from signed-in customers. Groceries, coffee subscriptions, pharmacy: the shopper buys every week or month while logged in, and a reorder button saves steps on every purchase.
  • Operating-system-only features. With ActivityKit, an app shows Live Activities which, according to Apple, appear on the Lock Screen, in the Dynamic Island and on the Home Screen of iPhone and iPad, such as delivery status. A PWA cannot.
  • The app store as a channel. If your audience searches the App Store or Google Play, being there helps, although web.dev notes a PWA can also be listed on Google Play, the Microsoft Store and the App Store.
  • Push as your main channel on iPhone. On iOS, web push only reaches people who added the web app to the Home Screen, a manual step with no automatic prompt. If you depend on that, measure how many people take it before you decide.

Add up the fixed cost too. You need an account in each store: the Apple Developer Program is 99 USD per membership year and Google Play charges a US$25 one-time registration fee. That is two more apps to ship and maintain, and guideline 4.2 of Apple's App Review Guidelines asks for more than a repackaged website: wrapping your store in a web view does not make it native. For physical goods, guideline 3.1.3(e) requires payment methods other than in-app purchase, such as Apple Pay or card entry.

six questions before paying for an appcriteriona PWA is enough ifgo native ifhow they arriveGoogle, ads, socialthey open the app iconreordersevery few monthsweekly or monthlypush on iPhonenice to have, Home Screencore to the businessfeaturescatalog, cart, checkoutLive Activities, other nativeteamthe one running the siteiOS, Android and reviewsfixed costthe hosting you already payApple 99 USD/yr + Play 25 USDif most rows land on the left, start with the PWAEcomLabs' rule of thumb, not Apple's or Google's; fees from their official pages

Scroll the figure sideways to see all of it

That table is our rule of thumb, not an Apple or Google rule. If almost everything lands in the PWA column, start there and ask again once you have usage data:

the route: start on the web, decide with data1 · do you need a native-only feature?e.g. Live Activities for the order2 · ship the minimum PWAmanifest · service worker · HTTPS3 · measure installs and usepwa_install · pwa_launch · purchaseno4 · does the icon bring repeat orders?yes: native appthe web keeps sellingyes: weigh a native appno: stay with the PWAdecide on a native app with reorder datapwa_install relies on appinstalled, which only Chromium fires

Scroll the figure sideways to see all of it

How to measure whether your PWA gets installed and used

Measure installs and launches from the icon. Per web.dev, appinstalled only fires in Chromium browsers, when the user accepts the install (on Android with a WebAPK, when the dialog is accepted, not when installation finishes). iPhone has no such event, so we also measure launches: start_url carries ?source=pwa, and the display-mode media query tells you whether the page runs in its own window. This is the rest of pwa.js, below the registration:

window.addEventListener("appinstalled", () => {
  gtag("event", "pwa_install");
});

const standalone = window.matchMedia("(display-mode: standalone)").matches;
const fromIcon = new URLSearchParams(location.search).get("source") === "pwa";
if (standalone && fromIcon) {
  gtag("event", "pwa_launch");
}
  1. gtag already exists if your GA4 tag is on the page; gtag("event", "<event_name>", {...}) is the form in GA4's event docs. We send no parameters here.
  2. appinstalled sends pwa_install once, when the install is accepted, and only in Chrome, Edge and other Chromium browsers.
  3. matchMedia("(display-mode: standalone)") is true when the page opened in its own window; web.dev says to match the mode in your display, and MDN lists the values.
  4. fromIcon looks for source=pwa, which only the first page of each launch from the icon carries.
  5. With both conditions, pwa_launch counts launches, not every page viewed inside the app.

Both names follow GA4's event naming rules: they start with a letter, use letters, numbers and underscores, and are not reserved. GA4 is case sensitive: PWA_Launch would be a different event.

To see whether it gets used, build a session segment in Explore of sessions that include pwa_launch; per GA4's help on segments, segments only exist in Explore and are retroactive. Compare it with everyone else: purchases, revenue and how often they return. If your cart tracking is not solid yet, start with the GA4 add_to_cart event. If hardly anyone opens the store from the icon, we read that as a sign a native app would not have many people to keep either.

What we tested

We served the files with node:http on 127.0.0.1 and opened them in Chromium 151 from Playwright 1.62 (Windows 11, Node 22.22.3). The page defines gtag with the two lines from Google's snippet without loading gtag.js, so nothing left the machine. We asked the browser for the manifest over the DevTools protocol. This is the output:

Chromium 151.0.7922.34
ok  first load: registration active, page not controlled: {"active":"activated","scope":"http://127.0.0.1:55207/","controller":null}
ok  after reload: controlled by: {"controller":"http://127.0.0.1:55207/sw.js","state":"activated"}
ok  cache shell-v1: ["/app.css","/icons/icon-192.png","/offline.html"]
ok  CDP Page.getAppManifest: browser fetched it, errors: []
ok  manifest fetched and parsed: {"type":"application/manifest+json","name":"Tienda Demo","start_url":"/?source=pwa","display":"standalone","icons":["192x192","512x512"]}
ok  CDP parsed manifest: {"id":"http://127.0.0.1:55207/","startUrl":"http://127.0.0.1:55207/?source=pwa","display":"kStandalone"}
ok  CDP Page.getInstallabilityErrors: []
ok  tab: display-mode: {"standalone":false,"browser":true,"events":[]}
ok  simulated appinstalled -> dataLayer: [["event","pwa_install"]]
ok  simulated standalone + ?source=pwa -> dataLayer: [["event","pwa_launch"]]
ok  simulated standalone without ?source=pwa -> no event
ok  offline navigation: {"title":"Sin conexión","h1":"Sin conexión"}

12 checks passed
  1. First load: the service worker reaches activated, but controller is null.
  2. After a reload, /sw.js controls the page.
  3. The shell-v1 cache holds exactly the three shell files.
  4. Chromium fetched the manifest with no errors, and a fetch confirms the type and fields.
  5. id resolved to the origin plus /; kStandalone is Chromium's internal name for standalone.
  6. No installability errors. We did not test the install prompt or a real install.
  7. In a tab, standalone is false: with ?source=pwa, nothing was sent.
  8. Simulated install: we dispatched appinstalled by hand and pwa_install arrived.
  9. Simulated launch: we replaced matchMedia to answer standalone; with ?source=pwa, pwa_launch arrived, and without it, nothing.
  10. Offline, a product URL that was never visited returned offline.html.

We did not test on an iPhone: before you trust the number, confirm in DebugView that pwa_launch arrives from the Home Screen web app.

Common mistakes

  • Caching product pages or the cart. With Cache First on HTML, a shopper can see an old price, or a sold-out item shown as available. Cache only the shell.
  • Intercepting checkout or the cart API. If you have no use for those requests, do not call respondWith for them.
  • Waiting for beforeinstallprompt on iPhone. Per web.dev, Chrome and Edge on iOS do not install PWAs. Show manual instructions, and only in browser mode, with the same media query.
  • Asking for notification permission on page load. WebKit requires the request to come from a direct user interaction, such as tapping "Notify me when it's back".
  • Adding ?source=pwa to an installed PWA with no id. Without id, the identity is the start_url, and changing it creates another app. Set id to your current start_url first, then add the parameter.
  • Measuring only appinstalled. That leaves out every iPhone.
  • Expecting installs from Instagram. web.dev warns that many in-app browsers, Instagram's and Facebook's among them, cannot install PWAs: someone arriving from a Reel has to open the store in Safari or Chrome.

Frequently asked questions

Can a PWA be listed on Google Play or the App Store?

Yes, as an optional channel, per web.dev. On Android you package it as a Trusted Web Activity, which uses Digital Asset Links to verify the app and the site belong to the same developer. On the App Store, Apple's guideline 4.2 applies: the app has to go beyond a repackaged website.

Do PWA push notifications work on iPhone?

Yes, since iOS 16.4, but only for web apps added to the Home Screen, and permission is requested after a user interaction. They do not reach a Safari tab. Since iOS 18.4 there is also Declarative Web Push, which needs no service worker.

Do I need a service worker for a PWA to be installable?

For installing from Chrome's menu, no longer, as of version 108 on Android and 112 on desktop. The Chrome post that announced it noted that the automatic install prompt still required a fetch handler; ours has one, and you need it anyway for offline mode and push.

Does a PWA make the store faster or help SEO?

Not on the first visit, because the service worker does not control the page yet; on later visits the shell comes from the cache. It does not change your URLs or your HTML, so it is not an SEO change in itself. For speed, start with LCP.

Checklist

  • The store is served over HTTPS.
  • The manifest has id, name, short_name, a start_url with ?source=pwa, scope, display and 192 px and 512 px icons.
  • Every page links the manifest, served as application/manifest+json.
  • /sw.js lives at the root and is registered on every page.
  • The cache holds only the shell and offline.html; HTML, cart and checkout go to the network.
  • The cache name changes whenever the shell changes.
  • GA4 receives pwa_install and pwa_launch, confirmed in DebugView.
  • You have an Explore segment of sessions that include pwa_launch.
  • You decide on a native app with that data, not before.

A PWA does not replace the basics: a store that loads fast (hero image LCP), a checkout that is easy on a phone (mobile checkout autocomplete) and measurement you can trust (the GA4 add_to_cart event). And if someone pitches rebuilding the store just to get an app, read when headless is not the answer first.

Saw this on Instagram? Comment PWA on the Reel and I'll send you the guide.

Written by

Luis Morales

Luis Morales

Frontend and Shopify developer, EcomLabs

@luismoralesdev on Instagram

Published November 3, 2026

← Blog