How to implement Google Analytics in hybrid mobile apps?

为君一笑 提交于 2019-12-04 13:08:57

I use the ngCordova Google Analytics plugin. You don't need Angular or Cordova to use it http://ngcordova.com/docs/plugins/

The git and docs are here: https://github.com/danwilson/google-analytics-plugin

Easy to use.

Warning! When you set it all up leave it 24hrs to 'propagate' or whatever Google does. People find its not working and go searching for solutions (which cannot be found) and then BAM the next day its all good.

You can create a plugin to bridge between your JS and Native GA SDK. There are some already written plugins for your reference

https://github.com/danwilson/google-analytics-plugin

First, in 2019 and later you probably want to use Firebase for mobile app analytics.

Google it.

Second, no matter what you decided to use, Firebase or Analytics, you can

1) use plugin (there some of them for both Firebase and Analytics)

2) just include relative script in your index.html same way you do in web app. In this case in Analytics console you should create 3 different apps (one for each platform), that you can be able to separate user activity on iPhone from Android and Web.

Checkout implementation on http://shashibadhuk.com/phonegap/implement-google-analytics-on-phonegap-mobile-app/

for

 https://github.com/danwilson/google-analytics-plugin
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!