Discussion Forums  >  Maps, Device Location, Tracking

Replies: 8    Views: 347

trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
01/19/13 04:19 PM (11 years ago)

Flurry Analytics for Buzztouch

I've been messing around with Flurry in my app. I don't see how to track which screens are being used at all. Sure, I can track IF screens have been used but not which screens. I've got over 100 screens. All I can tell from Flurry is that a custom html screen, a customURL screen, etc...has been used but not which individual screens have been used. Is there a file I can put the Flurry code in besides the BT_screen_customHTML.m or customURL.m? I need to know which of those many screens are being viewed. Bruce
 
Kaybee
buzztouch Evangelist
Profile
Posts: 659
Reg: Sep 22, 2012
Perth, Australi...
44,690
like
01/19/13 05:46 PM (11 years ago)
Hey Bruce, I have PM'd you with a question I have for you about setting up Flurry, with regards to tracking, I believe you can add a code as below just underneath the action code that you want to track.... From the Flurry site: Tracking User Behavior [Flurry logEvent:@"EVENT_NAME"]; Use logEvent to count the number of times certain events happen during a session of your application. This can be useful for measuring how often users perform various actions, for example. Your application is currently limited to counting occurrences for 300 different event ids (maximum length 255 characters). [Flurry logEvent:@"EVENT_NAME" withParameters:YOUR_NSDictionary]; Use this version of logEvent to count the number of times certain events happen during a session of your application and to pass dynamic parameters to be recorded with that event. Event parameters can be passed in as a NSDictionary object where the key and value objects must be NSString objects. For example, you could record that a user used your search box tool and also dynamically record which search terms the user entered. Your application is currently limited to counting occurrences for 300 different event ids (maximum length 255 characters). Maximum of 10 event parameters per event is supported. An example NSDictionary to use with this method could be: NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@"your dynamic parameter value", @"your dynamic parameter name", nil]; [Flurry logEvent:@"EVENT_NAME" timed:YES]; Use this version of logEvent to start timed event. [Flurry logEvent:@"EVENT_NAME" withParameters:YOUR_NSDictionary timed:YES]; Use this version of logEvent to start timed event with event parameters. [Flurry endTimedEvent:@"EVENT_NAME" withParameters:YOUR_NSDictionary]; Use endTimedEvent to end timed event before app exists, otherwise timed events automatically end when app exists. When ending the timed event, a new event parameters NSDictionary object can be used to update event parameters. To keep event parameters the same, pass in nil for the event parameters NSDictionary object. [Flurry logAllPageViews:navigationController]; To enable Flurry agent to automatically detect and log page view, pass in an instance of UINavigationController or UITabBarController to countPageViews. Flurry agent will create a delegate on your object to detect user interactions. Each detected user interaction will automatically be logged as a page view. Each instance needs to only be passed to Flurry agent once. Multiple UINavigationController or UITabBarController instances can be passed to Flurry agent. [Flurry logPageView]; In the absence of UINavigationController and UITabBarController, you can manually detect user interactions. For each user interaction you want to manually log, you can use logPageView to log the page view. Tracking Application Errors [Flurry logError:@"ERROR_NAME" message:@"ERROR_MESSAGE" exception:e]; Use this to log exceptions and/or errors that occur in your app. Flurry will report the first 10 errors that occur in each session. Tracking Demographics [Flurry setUserID:@"USER_ID"]; Use this to log the user's assigned ID or username in your system after identifying the user. [Flurry setAge:21]; Use this to log the user's age after identifying the user. Valid inputs are 0 or greater. [Flurry setGender:@"m"]; Use this to log the user's gender after identifying the user. Valid inputs are m (male) or f (female) Tracking Location CLLocationManager *locationManager = [[CLLocationManager alloc] init]; [locationManager startUpdatingLocation]; CLLocation *location = locationManager.location; [FlurryAnalytics setLatitude:location.coordinate.latitude longitude:location.coordinate.longitude horizontalAccuracy:location.horizontalAccuracy verticalAccuracy:location.verticalAccuracy]; This allows you to set the current GPS location of the user. Flurry will keep only the last location information. If your app does not use location services in a meaningful way, using CLLocationManager can result in Apple rejecting the app submission. Controlling Data Reporting [Flurry setSessionReportsOnCloseEnabled:(BOOL)sendSessionReportsOnClose]; This option is on by default. When enabled, Flurry will attempt to send session data when the app is exited as well as it normally does when the app is started. This will improve the speed at which your application analytics are updated but can prolong the app termination process due to network latency. This option mostly applies for devices running < iOS 3.2 that do not enable multi-tasking. [Flurry setSessionReportsOnPauseEnabled:(BOOL)sendSessionReportsOnPause]; This option is off by default. When enabled, Flurry will attempt to send session data when the app is paused as well as it normally does when the app is started. This will improve the speed at which your application analytics are updated but can prolong the app pause process due to network latency. [Flurry setSecureTransportEnabled:(BOOL)secureTransport]; This option is off by default. When enabled, Flurry will send session data over SSL when the app is paused as well as it normally does when the app is started. This has the potential to prolong the app pause process due to added network latency from secure handshaking and encryption. 4. Recommendations We recommend adding an uncaught exception listener to your application (if you don't already have one) and use logError to record any application crashes. Adding an uncaught exception listener is easy; you just need to create a function that looks like the following: void uncaughtExceptionHandler(NSException *exception) { [Flurry logError:@"Uncaught" message:@"Crash!" exception:exception]; } You then need to register this function as an uncaught exception listener as follows: - (void)applicationDidFinishLaunching:(UIApplication *)application { NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler); [Flurry startSession:@"YOUR_API_KEY"]; .... } Note that you can name the function whatever you'd like and record whatever error information you'd like in the error name and event field.
 
0z2000tv
Aspiring developer
Profile
Posts: 315
Reg: Sep 10, 2011
Nashville
11,950
like
01/19/13 05:52 PM (11 years ago)
I track 5 different screens. You can name the events in the Dashboard to make it easier to ID. Mike
 
trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
like
01/19/13 05:55 PM (11 years ago)
As an example here's what I have in my WB_screen_menuImage.m file. [Flurry logEvent:@"Event 4 Menu with Image screen accessed"]; [Flurry setUserID:@"USER_ID"]; [Flurry setAge:21]; [Flurry setGender:@"m"]; [Flurry setGender:@"f"]; [Flurry setUserID:@"USER_ID"]; CLLocationManager *locationManager = [[CLLocationManager alloc] init]; [locationManager startUpdatingLocation]; CLLocation *location = locationManager.location; [Flurry setLatitude:location.coordinate.latitude longitude:location.coordinate.longitude horizontalAccuracy:location.horizontalAccuracy verticalAccuracy:location.verticalAccuracy]; All that does is tell me that a screen has been viewed, not which screens. I'm wondering about the NSdictionary part of the code?
 
trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
like
01/19/13 07:07 PM (11 years ago)
As usual these companies don't realize that we don't know how or what their system does. I mean I get it, you're an analytics company. But understanding the data, how to get the data, what the data can mean, they leave all that out. There are all kinds of examples I can think of where I literally can not figure out what a company does or how what they do works or integrates into what I want to do (yet they're selling me their service). It's no wonder so many startups fail. I write emails asking questions that people don't understand because I don't know enough to ask the right question. Lol! Everyone is not a geek in the beginning of a learning curve. I can create an app, it doesn't mean I understand how to use your analytics. I even wrote Flurry asking them about the age and gender stuff. They wrote me back that they won't provide the info on age & gender, yet when I look in the Flurry dashboard (and watch videos on YouTube) they say they are tracking age and gender. Sorry for the rant. Anyway, for all I know what I want to do in Flurry is in their dashboard somewhere (not added to the code in my app). Kind of ridiculous. Hence my first question at the top of the page...
 
RandyJ
Lost but trying
Profile
Posts: 34
Reg: Dec 25, 2012
Alabama
6,840
like
03/29/13 02:55 PM (11 years ago)
Bruce, I know this is an older thread but I was wondering if you got this problem worked out because I have the same problem. I want to track specific page views and I was reading the forum to find out all that I could about Flurry. Did you get it working and if so, How'd you do it? Randy
 
trailman
Aspiring developer
Profile
Posts: 280
Reg: Dec 10, 2010
Sedona, az
6,550
like
03/29/13 03:02 PM (11 years ago)
Never did figure it out. I thought BuzzTouch was going to have this capability but so far I haven't seen anything. b
 
Kahuna
Apple Fan
Profile
Posts: 137
Reg: Nov 18, 2011
Milan
4,670
like
04/03/13 05:14 AM (11 years ago)
Hi Trailman, I'll have a look into it. Is it tracking the locations correctly? Regarding the screens, probably you've to use the NSdictionary to retrieve the ID of the screen (the BT item id not only the type of screen) and then associate a custom event to each of the items identified. I'll work on it tomorrow and let you know, Kahuna
 
us_david
Code is Art
Profile
Posts: 41
Reg: Dec 27, 2010
San Francisco
410
like
10/13/13 09:20 PM (10 years ago)
I don't know if there is a good solution for this issue or not. I was working on another App and had similar issue tracking the screen: BT_screen_customURL. The same screen prototype was used for different purposes and I need to customize screen behavior according to its usage. I am suggesting a field adding to the screen's json data: Tag which can be setup by user. In our app we can then use the tag to do customization or keep track screens with the same class. This is really an issue of keeping track the class instance... in my opinion. Feng
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.