简体   繁体   English

使用Flurry Analytics跟踪页面/屏幕浏览量

[英]Tracking page/screen views with Flurry Analytics

I just added Flurry to my project and some things are not so clear. 我只是将Flurry添加到我的项目中,但有些事情还不清楚。 As an instance I have ViewController1 and ViewController2 that I would like to track, how can I accomplish it? 作为一个实例,我要跟踪ViewController1ViewController2 ,如何实现? I should just add the below codes into my AppDelegate's didFinishLaunchingWithOptions: and it's ready? 我应该将以下代码添加到AppDelegate的didFinishLaunchingWithOptions: ,准备好了吗? Or I need to set logAllPageViewsForTarget: in each view controller's viewWillAppear: ? 或者我需要在每个视图控制器的viewWillAppear:设置logAllPageViewsForTarget: viewWillAppear:

  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

   [Flurry startSession:@"sampleID"];

    UIViewController *viewController1 =
    [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]instantiateViewControllerWithIdentifier:@"storyboardIDofViewController1"];

    UIViewController *viewController2 =
    [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]instantiateViewControllerWithIdentifier:@"storyboardIDofViewController2"];


    [Flurry logAllPageViewsForTarget:viewController1];
    [Flurry logAllPageViewsForTarget:viewController2];

return yes;
}

When do I need to call stopLogPageViewsForTarget: ? 什么时候需要调用stopLogPageViewsForTarget: It's needed always when the user closes the app, or what is it's function in practice? 用户关闭应用程序时始终需要它,或者实际上它有什么功能?

Actually I'm using logAllPageViewsForTarget: in my AppDelegate , but in my admin panel when I open the Page Views section I get this message: 实际上,我在AppDelegate使用logAllPageViewsForTarget: ,但是在管理面板中,当我打开“ Page Views部分时,收到以下消息:

You are not currently tracking Page View data. 您当前不在跟踪“页面浏览”数据。 Page View tracking is an optional part of the Flurry SDK that allows you to report the number of page views generated by your users for the purpose of tracking advertising. 页面浏览量跟踪是Flurry SDK的可选部分,可让您报告用户生成的页面浏览量,以跟踪广告。 Since the definition of Page View differs for each application, the Flurry SDK cannot track these for you automatically. 由于页面视图的定义因每个应用程序而异,因此Flurry SDK无法自动为您跟踪这些视图。 Instead, you need to add the appropriate integration points to track page views as they pertain to your application. 相反,您需要添加适当的集成点来跟踪与您的应用程序有关的页面视图。

Am I missed something important? 我错过了重要的事情吗?

The logAllPageViewsForTarget:(id) doesn't track specific view count. logAllPageViewsForTarget:(id)不跟踪特定的视图计数。

From Flurry Docs : Flurry Docs

This method increments the page view count for a session based on traversing a UINavigationController or UITabBarController. 此方法基于遍历UINavigationController或UITabBarController来增加会话的页面浏览量。 The page view count is only a counter for the number of transitions in your app. 页面浏览量仅是应用程序中过渡次数的计数器。 It does not associate a name with the page count. 它没有将名称与页数关联。 To associate a name with a count of occurences see logEvent:. 要将名称与发生次数相关联,请参阅logEvent:。

Therefore, if you want you want to track specific page view counts for specific view controllers you will have to use Flurry events. 因此,如果您想跟踪特定视图控制器的特定页面视图计数,则必须使用Flurry事件。

For example: 例如:

[Flurry logEvent:@"VC1_Viewed"];

Check out Flurry Events for detailed info. 查看Flurry Events了解详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM