That post is almost 2 years old. We didn’t have the JavaScript column back then.
Yes.
In fact, simply copy/pasting that code that you linked to seems to do the trick:
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();
[CleanSh…
If you need to see the results for all users, you would need a action that writes the result returned by the JavaScript column into a non-computed column.