简体   繁体   中英

Tracking Page views with the help of Flurry SDK?

I have integrated mobile analytics in my iPhone app with the help of the Flurry analytics but I am not able to track page views.

I have used the following code in my Application Delegate and passed an instance of UINavigationController in the place of navigationController
[FlurryAPI logAllPageViews:navigationController];

But while checking the Page views in the Flurry website it is showing the message like this:

You are not currently tracking Page View data.

Is there something that I have to enable in the flurry website itself?

Good that you now see your data.

On the page count: Flurry Analytics SDK just counts the number of page views. If you want to see what pages in your app the user visits, i suggest creating events for each of your screens. 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.

"logAllPageViews" method increments the page view count for a session based on traversing a UINavigationController or UITabBarController. If you want to track screens with screen name then just use logEvent method of FlurryAnalytics class like

[FlurryAnalytics logEvent:@"screen name"];

source (check for logAllPageVeiws and logPageView): http://support.flurry.com/sdkdocs/iOS/interface_flurry_analytics.html#adb7d3bd888a40343269c53f65acf7720

The other benefit of using events is that they are logged within minutes , showing up in the event logs of Flurry well before being accumulated into the summaries. This fast turnaround might prove vital to debugging, as described below.

Note one other gotcha if you fail to see anything, in the case of using iOS I was running many tests and not even events were showing up.

It turned out the code was initialising with

[Flurry setSessionSReportsOnPauseEnabled:NO];
[Flurry setSessionSReportsOnCloseEnabled:NO];

These supposedly buffer your flurry details until the start of the next session. However, some side-effect of debugging meant that the buffering wasn't preserved so my events were never being despatched.

(I inherited a large codebase recently so am still being surprised by things like this.)

If this question is still open or relevant, you may want to make sure you are adding the navigationController that is in charge of your navigation. Try posting some code with your questions will provide better answers.

It also takes a little bit of time to see results posted to Flurry.

You may also use Localytics for this purpose: http://www.localytics.com unlike the other services mentioned you will see your results immediately so you can integrate, test and be done with this process in less than 10 minutes.

The easiest way to track page views with Localytics is to tag an event, when each page is loaded. You can do that with a single API call (modified version of the example in the docs: http://wiki.localytics.com/doku.php?id=iphone_ios4_integration ) To track a page the code is: [[LocalyticsSession sharedLocalyticsSession] tagEvent:@"Start Page"];

Another clever thing you should do is, add an event in your applicationWillEnterBackground which tags an 'app exit' event which records what screen the user was on: NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: @"exit screen", current_screen_name, nil]; [[LocalyticsSession sharedLocalyticsSession] tagEvent:@"Leaving App", attributes:dictionary];

This way you can quickly see a distribution of your most common exit pages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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