Custom Events with Flurry Analytics for iOS¶
Events track specific actions that users take within your app – for example, making a purchase, playing a song, or sharing on Facebook. This helps you understand how users interact with your app. This page will show you how to easily capture this information by walking through a hypothetical Article Read event (note: this example is translatable to other actions such as Game Level Played).
For information on how Event data is reported in the Flurry portal, see Events & Event Reporting.
Please Note: You must initiate the session with one of the startSession method variants prior to logging any events. Any events logged prior to session initialization will not be recorded.
You can track up to 500 unique Event names for each app. Flurry will send automated emails to the Administrators on your account at 50%, 75%, and 90% of event limit usage. Once your app hits the 500 event limit, no further events would be tracked and an email will be delivered informing your Adminstrators that the limit has been reached. To avoid hitting this limit, read our best practices section down below.
Common Event Problem: In some cases, instrumentation bugs result in event names being created rapidly. This typically happens when a value, such as a GUID or a timestamp, that should have been in a parameter ends up in the event name. When the apps is launched, each recording of the event is unique, and the app quickly hits the limit. Obviously, being careful with your instrumentation is the first line of defense against this, but accidents do happen. In that case, on the Admin > Versions page, your Administrator can “Turn off Event Creation” for a given version. Once this is done, the mistakenly created events can be deleted on the Admin > Events page, and you can release new code with a fix for the instrumentation bug.
Events with Two-Level Structures¶
Events have a two-level structure. The highest level is the specific action, in this case the reading of an article. For this example, we are naming this Event “Article Read.”
By tracking this Event, you will be able to measure how many users are reading articles, how often, and so on.
Only 1 line of code is required to track this Event:
You can track up to 500 unique Events names for each app. There is no limit on the number of times any event can be triggered across time. Once you have added Events to your app, Flurry will automatically build User Paths based on this data, so you can see how a user navigates through your app. You can also use Events to build conversion funnels and user segments.
Note that there are limitations on the number of events that can be tracked within a given session.
Capture Event Parameters¶
The second level in the Event structure is the Event parameter. These are characteristics of the Event itself or the user performing it. For instance, a characteristic of the Article Read event is the author of the article. A characteristic of the user is their status (i.e. registered or anonymous). Parameters let you easily view the distribution of Event characteristics, so you can answer questions such as who is the most read author or what percentage of users reading articles are registered?
You can capture Event parameters (which include the Event itself) with two lines of code:
Each Event can have up to 10 parameters, and each parameter can have an infinite number of values associated with it. For example, for the ‘Author’ parameter, there may be 1,000 possible authors who wrote an article. Flurry can keep track of each author via this single parameter.
Capture Event Duration¶
You can also add the dimension of time to any Event that you track. Flurry will automatically record the duration of the Event and provide you metrics for the average Event length overall, by session and by user.
You can capture Event duration (along with the Event and its parameters) with a single log following this pattern:
For information on Event reporting in the Flurry portal, see Events & Event Reporting.
Events Best Practices¶
Make sure to read the long version of our best practice for logging the events. Here are some quick pointers for implementing Events:
Outline your business goals and the questions you want to answer, then map Events to track each action you need to measure.
Name your Events for easy identification and categorization. If you have more than one application that has similar Events, name them the same across apps so you can more easily compare performance
Add Event parameters on every Event wherever applicable.
Use timed Events wherever relevant. Flurry automatically breaks up usage into time buckets, so it’s very little effort to gain very valuable information.
You can always add more Events to your app. However, it will require a resubmission to your platform’s app store so that your users have a version of the application with these Events tagged.
Important: It is a violation of Flurry’s TOS to record personally identifiable information such as a user’s UDID, email address, and so on using Flurry. If you have a user login that you wish to associate with your session and event data, you should use the SetUserID function. If you do choose to record a user id of any type within a parameter, you must anonymize the data using a hashing function such as MD5 or SHA256 prior to calling the method.
Final Step: Configure Advanced Features in Flurry Analytics.