-->

Track Add To HomeScreen Web App in Google Analytic

2019-08-04 17:51发布

问题:

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.