Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA INSTALL DETECTION FOR ANALYTICS PURPOSE #862

Open
irtaza9 opened this issue Dec 11, 2022 · 0 comments
Open

PWA INSTALL DETECTION FOR ANALYTICS PURPOSE #862

irtaza9 opened this issue Dec 11, 2022 · 0 comments

Comments

@irtaza9
Copy link

irtaza9 commented Dec 11, 2022

Hey @iondrimba , can we are able to detect the install on pwa on user device.

Scanerio

I want to store the logs of PWA install in database when user install it on device(laptop,mobile,tablets) for conversion purposes. I tried the display mode work but it'is not giving me accurate result.

Code snippet

let displayMode = 'browser';
  const mqStandAlone = '(display-mode: standalone)';
  if (navigator.standalone || window.matchMedia(mqStandAlone).matches) {
    displayMode = 'standalone';
  }
ga('set', 'dimension1', displayMode);

Tech Stack

React ( same service worker and servicerworkerregistration )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant