4

Does anyone know if it's possible to track website traffic coming specifically from a home screen icon on an Apple device?

E.g. when I specify the following HTML I can obviously control the image that appears when the user adds a shortcut on their homescreen:

<link rel="apple-touch-icon" href="touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad-retina.png">
<etc, etc>

enter image description here

I'd like to know how many people are launching from their homescreen i.e. pressing the orange button in the above example. I don't think it's possible, but I was wondering if anyone had a trick up their sleeves?

TIA ♥

Elena
  • 364
  • 2
  • 9
Tia
  • 41
  • 2

1 Answers1

2

navigator.standalone Returns a boolean indicating whether the browser is running in standalone mode. Available on Apple's iOS Safari only.

if (window.navigator.standalone) {
  // From home screen
}

From Safari Web Content Guide:

You can determine whether a webpage is displaying in standalone mode using the window.navigator.standalone read-only Boolean JavaScript property. For more on standalone mode, see apple-mobile-web-app-capable.

Valentin Podkamennyi
  • 7,161
  • 4
  • 29
  • 44
  • 1
    [Safari HTML Reference](https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html): You can determine whether a webpage is displayed in full-screen mode using the `window.navigator.standalone` read-only Boolean JavaScript property. – Valentin Podkamennyi Oct 18 '15 at 21:31