Web app installs: Why, when, how
Hi, everyone.
Thanks for watching.
The session today is on web app installs-the why the when and the how.
If you haven't been completely deafened by the buzz of apps over the past decade, I would love a pair of your noise-canceling headphones.
The word app is now a standard lexicon for all users, both technical, and non-technical almost everywhere in the world.
For the multi-touch generation, apps are basically synonymous with a digital experience.
But what fundamentally our apps, it might seem obvious, but is it really?
What is the distinction between a website and an app?
This won't be a shock, but there isn't really an authority for what an app really is.
All we can do is try and list out some of the common properties.
So here's a few properties of a website.
You might notice that these are all pretty desirable properties in the right circumstances.
And there are also some of these properties that are true some of the time, but not all the time.
And these are marked in gray.
So for example, the web can run on pretty much any device quick to open and use.
Hopefully if you're designing your website well.
It can open from the browser.
Or of course it can run as a standalone window.
It might work offline if you've done some extra work to make it do that, or it might not in most cases still not, unfortunately.
We hope more website support offline soon.
And, it may not be specifically optimized for the layout of the device.
So it will, might have break points, but they're fairly generic.
It's not saying, you know, this is the screen is laid out in this exact aspect ratio.
And finally, a website is linkable.
Let's compare that to an app.
Usually these are ecosystem specific.
Of course you can use cross-platform frameworks.
Typically apps are downloaded and installed.
Although instant apps are a thing.
Apps can be opened from launchers and files.
It feels like it runs independently.
It doesn't need like some server somewhere to work.
Typically has its own window, works offline and it often has powerful capabilities, the system access.
And it may or may not be linkable.
Let me touch back on that offline common [unclear] for a moment because like many apps just have a very simple offline, you know, this app needs connectivity in order to work and that's fine.
That counts as offline.
So there's one more thing I want to add here.
Which is how our user feels about these two different types of experiences.
I believe that users tend to feel that they are just visitors on a website and we reinforce this perception with the words we use.
On a website, you are a visitor, but on the other hand, you "get" an app.
Getting implies that it belongs to you.
Now, I think we all understand that data in an app can also live in the cloud.
Just like data in a website can live in the cloud.
And data in the website could also be local and data in an app can also be local.
But the words we choose has implications for how users think about these things.
And I really do think that users think about a website as something that they use and an app is something that they own or possess.
Let's talk for a moment about web apps.
Some of you might be old enough to remember this little beta app called Gmail.
So why are we taking this trip down memory lane?
Well, because it illustrates a point really nicely.
When Gmail came out, there were lots of other email clients.
In fact, pretty much everyone who had a computer had an client already installed on it.
This was the internet's first real killer app.
In fact, not only were there lots of other email apps out there, but most of them had honestly more and better features than the first release of Gmail.
So why was it that Gmail and other web-based email clients that came out at the time able to get so much market share.
And the answer is that because it was universally linkable, shareable.
It was nearly instant to load.
It was safe and relatively private.
That means that even if you had a shared computer inthe household for example, everyone could have their own private email account.
Email's come a pretty long way since then.
But 20 years ago it had what it took to win market share from extremely popular and common email clients.
So how does that apply to progressive web apps and how we think about this app versus web stackup?
A Progressive Web App is an installable web application.
It uses modern APIs and as an installed application, it can appear on the device's launching services, including the activity switcher, content sharing surfaces, et cetera.
And it can also work offline.
It can run services in the background and it can access device hardware such as Bluetooth or the file system.
So what my team and I are trying to accomplish is to increase the power of web apps, pushing into capabilities that were previously reserved for native apps.
Coming back to the Gmail example.
There's this question of, can we ever achieve parity?
And I get asked this a lot and the answer is probably not.
There is a law of diminishing returns to consider.
We get into more and more esoteric functionality that gets more and more expensive to manage and maintain, but here's the thing: does parity really matter?
G-mail didn't need to be exactly the same as those desktop based email clients in order to compete.
It was able to compete just fine with its own merits.
It just needed enough capabilities such as webXHR in order to be able to do dynamic loading.
And like once it had those capabilities, it was able to do a job that was competitive, even though the benefits of using it implied trade-offs.
I'll be the first to admit it's been a bit of a strange journey getting us here, Apple bet big on web apps with the launch of the iPhone.
I mean, there were no native apps on early iPhone models.
Now a native App preference might be strategic for them.
There are undoubtedly cases where a native app is the right choice, but is this really the case for all, or even most apps?
Does a parking app or a finance app really benefit from being native?
I think what we want to do is get to a world where you can get the best of everything.
And that's really what PWAs are here to give us.
We want to bridge these gaps into a seamless experience that can work in a browser tab and an ephemeral linkable universal way, and then it can be installed and it can take advantage of operating system UI affordances, like sharing the activity switcher and launching surfaces such as the home screener or the start menu.
So let's talk about one incredibly powerful capability of web apps that works almost everywhere.
Yes.
I know it's a little early for Christmas, but I do love this animation.
The fact is you really can install a web app now on all of your devices.
Go ahead and give it a try.
If you'd like: YouTube and Reddit are both installable.
For example, on Windows, Mac, and Linux devices.
Web Install offers users access to web apps from familiar discovery launch surfaces on the device.
And of course these apps can be standalone.
So they're totally separate from the browser.
They use the native task switcher and, you know, this may be more familiar to some users or more suitable than tabs for some types of activities.
Web Install integrates Web apps with device services that expect an installed app.
Here's the important thing to remember when you're asking your users to install your PWA.
With an installed app, you are telling your users that this is an experience that was meant for their device.
And that does mean that you need to live up to those expectations.
So you want to follow design patterns that are going to give not just an installable app, but an installable app with a UX that's going to look and feel like it belongs on the device the user is running it in.
Your basic requirements for supporting the installable web are to have both a web manifest and a service worker.
These are actually in the year 2021 are pretty well-documented now.
These are the same requirements to be classified as a PWA.
I'm going to be covering mostly the manifest.
For the service workers, the requirement for install is that you do load offline.
And if the user opens your app while disconnected, they need to be able to see something.
You're going to find some amazing content and code labs from Google and around the web on this topic.
The manifest is a simple JSON file, which informs you how your site acts when it's installed.
You need one per app and it needs to be linked from every page of your site.
So the user can tap "install: pretty much anywhere.
Pretty much all modern browsers have some level of support for the manifest.
Here's how you include a manifest on every page.
In case the user hits install there.
The actual manifest is pretty boring, but here's a complete manifest.
It's small and extnsible.
I'm not going to cover every field today.
There's lots of information out there on the web if you want more details on any particular field type.
But let me just touch on a couple of the most important ones.
So first there's the start URL.
This is where your users begin their journey.
When they launch your app on their own OS.
And you can use this query string parameter to capture session launches in your analytics.
A second, this screenshot section is what is going to give you your users a better install experience.
This is already available on mobile, and it's going to be coming soon on desktop.
So here's a, an example of the upgraded install UI.
And so if you have the screenshots in your manifest, then, for example, on Android, you're going to get install UI that looks more like this, as opposed to an info bar and a confirmation dialogue that didn't give the user a good idea of how your app was going to look and feel before.
Finally, let's talk for a moment about how window, windowing is going to work via the display mode JSON field.
So there's a few different options here.
For games, you might prefer a full screen display mode.
This is the example there with Santa.
And for anything app-like you're probably going to want to use standalone which doesn't completely fill the screen from headset.
This is more a standard app-like UI on, especially on a mobile device, websites in any mode can be installed and still run in the browser.
So you can use display mode browser, and there's a few other options like minimal UI, but you can read more about those online.
So now that you know how to make apps installable, I'm going to show you how and when to promote a web app install.
Please just promote web app install when it makes sense.
So I'm going to show you some examples of that, but the focus should be on the user.
How are you helping the user get their job done?
If asking the user to install at this particular moment, isn't helping them get their job done, then you shouldn't be doing it.
So where should you promote app install?
First, the header can be a good place, but you should be careful here.
Especially on a phone.
These are super precious pixels.
So you want to use information architecture, techniques and AB testing to determine whether it really makes sense to have a permanent install button here.
It's going to depend on your use case.
Like you probably have other information here, like your logo, a hamburger menu, maybe other shortcut items, like for example, a shopping cart shortcut on an e-commerce site.
These are all really important use cases for the user, and they might be more important than installing your, your, your app.
So consider carefully before using this space, but it is an option.
Here's an example of adding an install promotion through the hamburger menu.
The really great thing about using the menu for promoting your web app is users browsing your menu.
That means they're looking for something.
You don't want to block any important information, by promoting this, like, for example, the very top of your hamburger, you might want to put it a little bit further down.
So the users, you know, again, use information architecture, techniques, AB testing, to understand what your user is most likely looking for.
But the menu is a great place to put it because it's a menu it's there to fulfill the user's needs and it's there to fulfill needs that they need a little bit less frequently than things that are are up in the header.
Here's an example of promoting install on a landing page.
And I mean, landing pages are basically all about marketing your site.
So just go crazy here, keep in mind that the usual best practices for a landing page to tell the user about your content or your product or your service.
And if the user doesn't understand what your site does or why they would want to install it, they're probably not going to.
So just make sure that you get that up front.
Now a lot of sites have feeds whether that's news or photos or recipes, and that feed pattern can be a great option for promoting PWA install.
You can just essentially insert feed cards that are like, you know, they look and feel like most of the other cards in the feed.
Next up, they promote the installer of your app.
It's great for news apps can be good for e-commerce sites for things like the product listing page and anywhere, there's a lot of vertical scrolling and information chunking.
You probably don't want to show this promotion too often, and you might want to include a dismiss option so that the user can get rid of the card if they are never going to want to install your app.
And so you don't keep annoying them.
Keep in mind that every app use case is a little bit different and there will always be key moments of engagement in the journey, when you know, the user is interested in your offer and understands it effectively.
That's a great moment to see if they want to connect with you again soon.
So the usual rules apply here.
Focus on the benefit to the user.
Use the context of those key moments.
Like in this example where we can let the user know that they can install instantly and then play the game again, by tapping off the launching surface of their screen.
Here's some basic principles for promoting PWA install.
Start with a good rule of thumb, please.
Don't be annoying.
Your users came to your site to get something done.
Don't interrupt their flow and make it harder for them to get that task done by asking them to install.
Just keep in mind.
It's really easy for them to leave.
So if you're annoying them with stuff, they're just going to ax it.
They're going to go somewhere else to your competitor's site, for example, and get their job done there.
The user's not benefiting, you shouldn't be promoting the install to them.
Finally do use context in advanced-help the user understand what they're really going to get from installing their app.
Like, what are they going to get out of that install?
What additional services or functionality are you offering?
Or like, why would they want to come back and visit your site more frequently because they've put it on their home screen?
Now, after you've got a user who's installed your app, you're gonna want to understand what's different about the behavior of installed users versus users who are viewing your site in a tab.
So don't forget the analytics.
There's really three important events in the install prompt flow.
First is an event called `beforeinstallprompt`.
And this happens when the site is qualified for install.
Second, when the prompt actually gets triggered.
So you can just listen, for example, for a click event on an install button on your site.
And then finally, when the install complete successfully, you will receive an `appinstalled` event and you can listen for this too, and you can tag it in your analytics, no matter which analytics package you're using, you can set this information as a custom event or you know, add the state as a custom variable.
You may be wondering, well, what about iOS?
And the great news is that iOS Safari has really good support for the essential PWA ingredients, like a service worker and a manifest.
And it's had these ingredients for quite some time now it's.
It's easier than ever to install PWAs on Safari.
And the other home screen option, which installs the app on Safari is a first level menu option.
So what you want to do is show up a promotional pattern for iOS.
Hey, here's an example of one we use for the Santa tracker.
And as you can see, when the Santa tracker install pops up, it just helps teach the user how to use Safari to perform the install.
Now, a lot of organizations do have native apps and they worry about accidentally promoting web install to users who already have that app.
You're going to want to promote your PWA to users of the website, but just the ones that don't already have the native app installed.
Keep in mind that there's all kinds of reasons that a user may not have, or want your native app, but might still want your web app.
So storage is one example since you know, storage is one of the number one reasons that users remove apps from their device and many apps use 10 to 50 megabytes of space.
Most web apps are comparatively tiny, just a few hundred kilobytes.
And like any of the dynamic storage, like the cache gets purged automatically by the browser in response to storage pressure.
So we may want to let users know that the option of the web app exists.
To avoid promoting your PWA install to native app users you want to use get installed related apps, and that API will let you see in JavaScript if the user has your native app installed.
Most PWA installs today are happening from the mini info bar or from the richer install UI.
This was the mini info bar is really not intended to completely replace your own browser promotion.
So you're going to want to you know, you may want to hide it completely and only trigger install from a promotion that you're running inside of your site.
If this is the case, what you want to do is you want to listen to the `beforeinstallprompt` event, and then you want to call `preventDefault` on that.
So that you will prevent either the richer install UI or the mini info bar from appearing on the screen unsolicited.
So that will basically stop Chrome from promoting the installability of your site to the user.
So here's the details really quickly.
We're adding an event listener for `beforeinstallprompt`.
And then all we do is we call `preventDefault` on that event.
And we might want to show an install button at the same time.
So we give a little example of doing that.
So in this case, you can see, we set `the installButton.hidden` to false, and Bob's your uncle.
Finally, you might want to capture a reference to the install event so that you can use it to prompt the user for an install later.
Here's an example of how to use that save reference.
So let's imagine you want to wait until the user has completed a critical part of their journey before prompting them about installing your app.
When you're ready, you can just call the `prompt` method on the saved event reference.
That's the talk for now, just a reminder of what we hope to accomplish here.
I want developers to have the capabilities they need to build amazing web apps.
And I want those users to be able to choose whether to experience that in the browser or in a standalone installed app window, whichever is better suited for their needs.
And the web is in this extremely unique position of being able to do that.
Installability is essential in enabling this.
And I hope this talk gave you all the basics that you would need in order to make your app installable, to promote it and to measure your success.
Thanks so much for listening.
You can reach me on Twitter.
If you have any follow-up questions.