I have a mobile web app with the Add to Home Screen functionality working well. I am trying to determine how to use Google Analytics to best track the app usage for those who have installed the app to their home screen. There doesn't seem to be a default way to see if an app is in standalone mode in analytics, is there a best practice for Google Analytics to track apps installed on the home screen?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can detect if the app is launched in PWA mode. Refer this answer on how to do it. Once you know your app is running in PWA mode, you can use a different tracking ID to track the PWA applications separately or you can use the same tracking ID and use the traffic source with appropriate value based on your PWA detection.