electron-ga icon indicating copy to clipboard operation
electron-ga copied to clipboard

Support old mobile safari

Open psineur opened this issue 6 years ago • 0 comments

Old Mobile Safari (like iOS 9) doesn't support const keyword in strict mode and has no window.fetch either.

Changes:

  • Fix unhandled exceptions on import (es5 target + libs for Promise/Dom)
  • Add polyfill for window.fetch

Test plan:

  • using old iPad Mini with iOS 9.3.2 & webpack dev-server
  • load website (universal web/electron react-app) containing electron-ga, observe it's not loading - throws in rendered.bundle due to const keywords
  • apply changes, install electron-ga-psineur package
  • app should load now
  • network dev tools tab should have google-analytics.com/batch when events are sent

psineur avatar Mar 26 '19 20:03 psineur