0

I am trying use amp-script to count pageviews in standalone mode. The plain javascript method using

window.matchMedia('(display-mode: standalone)').matches

doesn't work, it generates the window.matchMedia is not a function error messsage. Any ideea?

Varadinet
  • 1
  • 2
  • 1
    See Javascript example here. Not sure about amp-script https://stackoverflow.com/questions/51735869/check-if-user-has-already-installed-pwa-to-homescreen-on-chrome/51735941#51735941 – Mathias Dec 01 '19 at 13:50
  • 1
    @Mathias, amp-script has a lot of limitations, one of them is that matchMedia doesn't work. Thank you anyway. – Varadinet Dec 02 '19 at 12:43

0 Answers0