Skip to content

PWA INSTALL DETECTION FOR ANALYTICS PURPOSE #862

@irtaza9

Description

@irtaza9

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 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions