[英]How to Track Screen in Flurry in Swift (iOS)
I am able to track the events
and also able to track the real time report
, but the problem is I am not able to track the screen view
. 我能够跟踪
events
并能够跟踪real time report
,但问题是我无法跟踪screen view
。 I am using following code :- 我使用以下代码: -
Flurry.logEvent("Setting") Flurry.logAllPageViewsForTarget(settingsTabButton)
Please provide the clear and simple step by step way to do that. 请提供清晰简单的一步一步的方法。
Official Flurry doc: 官方乱舞文件:
Flurry.logAllPageViewsForTarget(navigationController)
To enable Flurry Agent to automatically detect and log page view, pass in an instance of UINavigationController or UITabBarController to countPageViews.
要使Flurry Agent能够自动检测并记录页面视图,请将UINavigationController或UITabBarController的实例传递给countPageViews。 Flurry Agent will create a delegate on your object to detect user interactions.
Flurry Agent将在您的对象上创建一个委托以检测用户交互。 Each detected user interaction will automatically be logged as a page view.
每个检测到的用户交互将自动记录为页面视图。 Each instance needs to only be passed to Flurry Agent once.
每个实例只需要传递给Flurry Agent一次。 Multiple UINavigationController or UITabBarController instances can be passed to Flurry agent.
可以将多个UINavigationController或UITabBarController实例传递给Flurry代理。
Enabling this (disabled by default) by implementing above tracking metric will provide you following metrics for your app: 通过实施上述跟踪指标启用此功能(默认情况下已禁用),可为您的应用提供以下指标:
However, Flurry Analytics Page Views just counts the number of page views per session and are not specific to a particular screen in your application. 但是,Flurry Analytics页面视图只计算每个会话的页面查看次数,而不是特定于应用程序中的特定屏幕。 So, tracking what pages are visited by user are via Custom Events .
因此,跟踪用户访问的页面是通过自定义事件 。
Page Views : Page views in Flurry are tracked via Custom Events.
页面视图 :Flurry中的页面视图通过自定义事件进行跟踪。 You can tag a Custom Event for every screen in your app and track the number of visits and unique visitors, among other metrics.
您可以为应用中的每个屏幕标记自定义事件,并跟踪访问次数和唯一身份访问者以及其他指标。
Here's an example and writing this code in either viewDidLoad()
or viewWillAppear()
depends on the type of screen you want to track. 这是一个示例,在
viewDidLoad()
或viewWillAppear()
编写此代码取决于您要跟踪的屏幕类型。
Flurry.logEvent("ScreenView_SettingsVC")
If you want to see what pages in your app the user visits, It is better to create events for each of your screens and log it in viewdidload
. 如果您想查看用户访问的应用中的哪些页面,最好为每个屏幕创建事件并将其记录在
viewdidload
。 The user paths report in the events section of your dashboard will then give you a clear path of how your users move around in your app. 通过仪表板的“事件”部分中的用户路径报告,您可以清楚地了解用户在应用中的移动方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.