Description
Use case is disambiguation of the following:
- Casual browsing to the PWA
- Installed via the browser
- Installed from an app catalog/store
Based on what’s out there currently, the first item is already covered. Numbers 2 & 3 could be aggregated by testing the display
value (via JS and CSS), but would not be distinguishable from one another. In order to truly distinguish those installation sources, it would require the developer to author at least two separate manifests that have a start_url
with a unique query string parameter (e.g., /?installed=web
, /?installed=store_name
). While doable, this approach could get out of control quickly as developers create unique manifests for each app catalog/store.
To simplify things, we could piggyback on the existing referer
header. Here’s what that might look like (all strings for presentation only):
- Casual browsing to the PWA: no change to
referer
(standard browser behavior) - Installed via the browser (Edge):
referer: "edge://apps"
- Installed from an app catalog/store (Microsoft Store):
referer: "store://www.microsoft.com/store/apps/windows"
This change in the behavior of referer
could be limited to the initial navigation, which would make it quite similar to the query string approach in terms of analytics tracking.