# Measure PWA installs

**URL:** <https://community.glideapps.com/t/measure-pwa-installs/58073>\
**Category:** Ask for Help\
**Created:** [February 17, 2023, 11:22am UTC](https://community.glideapps.com/t/measure-pwa-installs/58073 "2023-02-17T11:22:38Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 17, 2023, 12:12pm UTC](https://community.glideapps.com/t/measure-pwa-installs/58073/4 "2023-02-17T12:12:00Z")

</div>

> [@Boris](#):
>
> This post says adding JS is impossible - [How to Add CSS / Java Script in Glide app? - #2 by Jeff\_Hager](https://community.glideapps.com/t/how-to-add-css-java-script-in-glide-app/28726/2)

That post is almost 2 years old. We didn’t have the JavaScript column back then.

> [@Boris](#):
>
> Am I supposed to use a [JS column](https://www.glideapps.com/plugins/hell-yes-code) in a table?

Yes.  
In fact, simply copy/pasting that code that you linked to seems to do the trick:

```auto
function getPWADisplayMode() {
  const isStandalone = window.matchMedia('(display-mode: standalone)').matches;
  if (document.referrer.startsWith('android-app://')) {
    return 'twa';
  } else if (navigator.standalone || isStandalone) {
    return 'standalone';
  }
  return 'browser';
}

return getPWADisplayMode();

```

 ![CleanShot 2023-02-17 at 20.07.35@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/9/79f9468e9dc197a323ad2c51af31b30fe04c8a72.png)

Using the output of the above and displaying it in a hint component, I get:

1. In the builder (Chrome on MacOS):

 ![CleanShot 2023-02-17 at 20.07.08@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/28a359ab6c656d9961b73515babcf4ced1588be7.png)

1. When installed on the home screen on my phone (Safari on IOS):

 ![CleanShot 2023-02-17 at 20.08.11@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/f/6fa3104bbb666270d334b84f49a4a06ee5707d0f.png)

---

_[View the full topic](https://community.glideapps.com/t/measure-pwa-installs/58073)._
