Tracking Mobile/iPhone/Android Apps
- 1. Implement events using the library in the app’s native language
- 2. PhoneGap and JavaScript Library
- 3. Use Ruby/PHP/Python Library on backend
- Example:
- When a user launches the app, you can include an event trigger on your backend (Ruby Example):
- So now when a user does something on your app, you can now record key events for every feature available as it comes into your backend:
- In addition, you can always set custom properties to users at any time without recording an event. Let’s say you want to know what the first thing a user does after they launch your app.
Kissmetrics can track your mobile website using our typical JavaScript Library. For a native iOS or Android application, you’ll need to do some more work.
1. Implement events using the library in the app’s native language
- iOS/Objective-C: an official library is available.
- Android: an official library is available.
2. PhoneGap and JavaScript Library
There are frameworks like PhoneGap that let you write mobile apps using HTML and JavaScript. Some of our customers have found success with using our JavaScript Library, with some modifications.
The Kissmetrics team has not personally tested how effective it is to use our JavaScript library in this way.
3. Use Ruby/PHP/Python Library on backend
Your mobile app may communicate with your backend servers when key events occur. When the above options do not work, you can record the server-side event using one of our available Ruby/PHP/Python libraries.
Example:
Data is sent when someone initializes the app. Kissmetrics can capture and record key events as they come in such as:
- Launched App
- Used Core Feature 1
- Used Core Feature 2
- Changed Settings
Use Kissmetrics’ APIs (Ruby/PHP/Python) to record these events seamlessly as they come in so that you can visualize the data you’re already getting. You’re cataloguing and organizing data with Kissmetrics by putting event triggers as data flows in from your customers.
When a user launches the app, you can include an event trigger on your backend (Ruby Example):
Once you have a script for grab_app_version
and grab_user_identification_data_from_db
it will then look like this for every user launching your app:
So now when a user does something on your app, you can now record key events for every feature available as it comes into your backend:
In addition, you can always set custom properties to users at any time without recording an event. Let’s say you want to know what the first thing a user does after they launch your app.
So you’ve identified them and recorded that they launched the app:
Now you want to find out what they do next.
Write a script to trigger a Kissmetrics API command on the FIRST action after launching the app. It could look like this (please excuse the pseudo-code):
The idea here is that you can designate which feature of your app is the “first feature” or “entry event” for users when they launch your app. Later, you can go into your reports and sort users by their first entry event or most recent entry event.
In addition, you can use Kissmetrics server-side API’s to track performance of automated systems such as how many times errors and bugs are being reported/logged.