Advanced Features for Flurry Analytics with iOS¶
Flurry offers a number of advanced features for iOS developers that enable you to gain even greater insight into your users.
For example, you can track
- geographic location of your users
- age and gender
- user ID
- page views
Tracking and Reporting Data¶
To track and report this data, you use the following Objective-C methods.
Track geographic locations¶
Flurry Agent does not require CoreLocation framework.
If your app has location permissions from user, Flurry will track where your app is being used. Flurry uses cached value (to avoid excessive battery usage) when location reporting is enabled.
To disable detailed location reporting even when your app has permission,[Flurry trackPreciseLocation:NO];
Track user ID and demographics¶
You must call these functions (setting User ID, age and gender) prior to starting the Flurry session
After identifying the user, use this to log the user’s assigned ID or username in your system.
Warning: Per our Terms of Service, you are not allowed to pass along unique device identifiers such as IDFA in this field.
After you identify the user, use this to log the user’s age. Valid inputs are 0 or greater.
After identifying the user, use this to log the user’s gender. Valid inputs are m (male) or f (female).
Track application errors¶
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.
Track page views¶
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.
You can learn more about page view tracking here
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.
Please note that Page Views are different from Custom Events. If you are interested in understanding a specific in-app action (e.g. user views Main Menu screen), track that action using Custom Events.
More details on setting up these Events can be found at Custom Events.
Configure when data is sent to Flurry¶
Flurry sends session data over SSL when a user pauses the app and when a user starts the app.
This option is on by default. When enabled, Flurry will attempt to send session data when the user exits the app and when the user starts the app. 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 mainly applies for devices running < iOS 3.2 that do not enable multi-tasking.
This option is on by default. When enabled, Flurry will attempt to send session data when a user pauses the app and when a user starts the app. This will improve the speed at which your application analytics are updated but can prolong the app pause process due to network latency.
This option is disabled by default. When enabled, Flurry will not finish the session if the app is paused for longer than the session expiration timeout. The session report will not be sent when the application is paused and will only be sent when the application is terminated. This allows for applications that run in the background to keep collecting events data. The time application spends in the background contributes to the length of the application session reported when the application terminates.
This method is useful if setBackgroundSessionEnabled: is set to YES. It can be called when application finishes all background tasks (such as playing music) to pause the session. A session report is sent if setSessionReportsOnPauseEnabled is set to YES. If the app is resumed before the session expiration timeout, the session will continue, otherwise a new session will begin.
Create an Ad Unit to Earn Revenue¶
With a little extra effort, you can leverage Flurry’s ad platform to increase revenue per user with high performing, quality ads.
To accomplish this, you can Set Up Your Ad Unit in a few easy steps.
You’ll have full control over the placement of the ad unit in your app, the ads being shown, time and frequency of when ads are displayed, and the audience segment you reach.
Was this document helpful?