Windows Phone - 放弃App时查找用户状态

时间:2014-06-02 16:19:30

标签: audio google-analytics windows-phone playback user-tracking

想要知道谁可以跟踪 Google Analytics 什么是用户状态(例如,运行音乐曲目,开始观看电影),当他点击主页或返回时按钮和放弃应用程序?

想要知道原因,为什么用户离开App并且多长时间是在他离开之前运行它。

1 个答案:

答案 0 :(得分:0)

您无法知道为什么用户离开了您的应用,但您可以跟踪用户对您应用的操作。

对于跟踪为您要跟踪的每个事件添加一行代码到您的应用。以下是您可以在应用中跟踪的不同类型活动的示例:

// 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 and Windows Phone