想知道谁可以我跟踪与谷歌分析什么是用户状态(例如运行音乐轨道,开始看电影),当他点击主页,或返回按钮和放弃应用程序?
想知道原因,为什么用户离开应用程序和他在离开前运行了多长时间
你不能知道为什么用户离开了你的应用程序,但你可以跟踪用户的动作进入你的应用程序。
For Tracking在你的应用中为每个你想要跟踪的事件添加一行代码。以下是您可以在应用程序中跟踪的不同类型活动的示例:
// track a page view
GoogleAnalytics.EasyTracker.GetTracker().SendView("main");
// track a custom event
GoogleAnalytics.EasyTracker.GetTracker().SendEvent("test", "userclick", null, 0);
// manually track an exception
GoogleAnalytics.EasyTracker.GetTracker().SendException("oops, something went wrong", false);
// track a transaction (in app purchase)
double cost = 1.99;
long costInMicrons = (long)(cost * 1000000);
var transaction = new GoogleAnalytics.Transaction("01234", costInMicrons);
var item = new GoogleAnalytics.TransactionItem("myproduct", "My Product", costInMicrons, 1);
transaction.Items.Add(item);
GoogleAnalytics.EasyTracker.GetTracker().SendTransaction(transaction);
// track a social networking interaction
GoogleAnalytics.EasyTracker.GetTracker().SendSocial("facebook", "share", "http://googleanalyticssdk.codeplex.com");
// track a timing (how long it takes your app to run a specific task)
GoogleAnalytics.EasyTracker.GetTracker().SendTiming(DateTime.Now.Subtract(startTime), "Startup", "MainPage", "Label");
更多参考你可以去Google Analytics SDK For Windows 8和Windows Phone