PWAInstaller

Adds custom logic and analytics events to track PWA app installation activity

Source:
Properties:
Name Type Description
promptEvent string

Browser event that will prompt the PWA installation workflow.

deferredPrompt object

Stored reference to the native PWA prompt event object.

limitWidth int

Max width at which PWA prompt is shown.

Methods

(inner) init()

Source:

Bind initial PWA prompt event listeners.

(inner) showButton()(event)

Source:

Add a button to the site header to trigger the PWA install prompt on desktop

Parameters:
Name Type Description
event object

typically the beforeinstallprompt event object.

(inner) showPrompt()()

Source:

If the snackbar prompt is accepted, trigger the native PWA install prompt.

(inner) showSnackbar(event)

Source:

Fires once the PWA prompt can be shown (typically on beforeinstallprompt). We'll hide the default prompt and show our own custom snackbar prompt.

Parameters:
Name Type Description
event object

typically the beforeinstallprompt event object.

(inner) track(eventName)

Source:

Analytics call for tracking PWA app installation activity

Parameters:
Name Type Description
eventName string

event name to track.