Consider all sections required unless otherwise noted.
Author: Aaron Gustafson, Diego Gonzalez
This document is a starting point for engaging the community and standards bodies in developing collaborative solutions fit for standardization. As the solutions to problems described in this document progress along the standards-track, we will retain this document as an archive and use this section to keep the community up-to-date with the most current standards venue and content location of future work and discussions.
In the context of app catalogs (e.g., Apple’s App Store, Google’s Play Store, and Microsoft’s Store), reviews are a critical component of app discovery. There is currently no means of enabling a progressive web app (PWAs) to participate in these catalogs’ ratings and reviews features without
For PWAs to become an equal participant in these catalogs, it will be critical that they have a means integrating with these rating and review systems.
When a user has shown significant engagement with a piece of software, the software developers might request that the user rate their experience with the offering or even write a review of it for the app catalog associated with the user’s operating system or a third-party. In the context of the prompt, the user can
Each app catalog provides its own API for triggering an app review flow within the context of that store:
SKStoreReviewController.requestReview()ReviewManager_requestReviewFlow), Java and Kotlin (ReviewManager.requestReviewFlow()), and Unity (ReviewManager.RequestReviewFlow()).RequestRateAndReviewAppAsync and the proprietary URL protocol ms-windows-store.To request a review, a PWA developer would use the Promise-based method navigator.requestReview(). This method will:
success value will be equal to the origin of the catalog chosen (e.g., play.google.com, www.microsoft.com, www.pwastore.com); orif ( 'requestReview' in navigator )
{
navigator.requestReview()
.then( catalog => console.log( `Handed off to ${catalog}` ) );
}
Resolution of the Promise does not indicate that a review was completed, it is only an indication that the user was successfully handed off to the app catalog. Once the handoff is complete, the UA must track that and reject any future calls to navigator.requestReview() with a "completed" value and not display the prompt.
When the Promise is rejected, the following reason values are allowed:
String indicating the user has already been handed off to the app catalog to review/rate the app.String indicating the user has declined to review/rate the app. If the UA allows the prompt to be closed without a choice being made, this should be the rejection value.String indicating the user has declined to review/rate the app and has explicitly denied this site access to this feature in future.Error providing details about an error that happened.To account for the different potential interactions, developers are encouraged to track the user’s status with regard to reviews. For example, they might update this code to include additional logic specific to their PWA:
if ( 'requestReview' in navigator &&
! app.review.declined &&
! app.review.completed &&
app.review.okToRequest() )
{
navigator.requestReview()
.then( catalog => {
// User was handed off to `catalog` to
// complete their review
app.reviews.completed = true;
app.reviews.catalog = catalog;
})
.catch( rejection => {
// User declined to review now,
// but did not take away our ability to ask again
if ( rejection === "deferred" )
{
app.reviews.askLater();
}
// User declined to review
else if ( rejection === "disallowed" )
{
app.reviews.userDeclined = true;
}
// something went wrong
else
{
console.log( rejection );
}
});
}
If a user disallows the PWA to prompt again, the user agent must track that and reject any future calls to navigator.requestReview() with a "disallowed" value without displaying the prompt to the user again.
When a user is prompted to rate or review a PWA, they should be presented with a dialog confirming their interest in doing so. It must state where they will be taken to complete the review (e.g., Microsoft Store) and provide them with the following options:
This prompt could look something like the following:

If the UA supports multiple catalogs, the prompt could look something like this:

UAs are encouraged to choose a single, relevant catalog, but UAs may choose to provide a small selection of catalog options the user can choose from. The following algorithm should be used to determine the correct catalog(s):
In order to simplify the implementation for UAs and provide each catalog with full control over UI, form fields, user account, etc., the UA is instructed to open a new display: standalone window navigated to the chosen catalog’s ratings/reviews URL. The PWA’s unique ID will be provided as the value of the query string parameter id. A PWA’s unique ID will be calculated as follows:
origin + (
manifest.id|| manifest_url )
It will be up to the catalog to resolve this unique ID against their own internal catalog system to ensure the correct PWA is chosen to associate with the rating/review.
Catalogs should make note of the following when it comes to tracking/resolving a unique ID:
id value has added, modified, or removed as this will affect the calculation of the unique ID on the UA side and may cause issues when it comes to resolving that unique ID against their own internal catalog.UAs may choose to include a unique string in the Referer header in order to enable the app catalog to know where the request originated. For instance, in the case of Microsoft Edge, it might use "edge://apps":
Referer: edge://apps
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4325.0 Safari/537.36 Edg/89.0.711.0
As the user controls whether to open the rating/review UI for a catalog is opened and given that no user-identifiable information is provided to that UI, no considerable privacy concerns are expected. But we welcome community feedback.
No considerable security concerns are expected, but we welcome community feedback.