我在我的 iOS 项目中使用 Google Analytics 绑定(bind) (https://github.com/mono/monotouch-bindings/tree/master/GoogleAnalytics),除了未跟踪的应用程序版本外,一切似乎都运行良好。当我在 Google Analytics 上看到报告时,应用程序版本始终是 (未设置) .
这是我在应用程序中使用的代码:
var ga = GoogleAnalytics.GAI.SharedInstance;
ga.GetTracker("UA-XXXXXXXX-X");
ga.DefaultTracker.TrackView("Home Screen");
我是否缺少一些东西来让它跟踪我的应用程序版本?
最佳答案
您必须实际设置应用程序版本才能使其正常工作。我不知道为什么谷歌让你这样做:
ga.DefaultTracker.AppVersion = NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleVersion")].ToString();
这将匹配您在 Info.plist 中的版本。
关于ios - Monotouch Google Analytics 应用程序版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15648221/