简体   繁体   中英

Tracking traffic from mobile devices' home screen in Google Analytics

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

Eg 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>

在此输入图像描述

I'd like to know how many people are launching from their homescreen ie 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 ♥

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM