Add Analytics to your App 2

amod kanthe
4 min readJan 12, 2019

--

So last time I have shared real basics of Analytics if anyone wants to read it here is the link https://medium.com/@amodpkanthe/add-analytics-to-your-app-b683cf2acbd1

There are many free as well as paid analytics tools available I have tried many of them in my suggestion following are few good ones

1]Firebase

2]Google analytics

3]Flurry

4]Mixpanel

5]Answers

6]Urban airship

7]Mo-engage

8]Clevertap

Other than user behaviour you can also track app installs following are some good tools for install tracking

1]Branch

2]Appsflyer

While adding analytics to app you have to make sure you have implemented following things

1]Events and events properties

2]User and user properties

3]Session UTM’s

4]Page views

5]Install tracking

Events and events properties

An analytics event is noting but user interaction with content i.e app screen example a button click another example could be a product grid click in an e-commerce shopping app. Events properties are attributes of event.

Example lets consider product_click is an event then its attributes i.e. event properties will be product_price, product_name, product_brand etc.

Note it is really important that you send event properties along with event otherwise you will not be able to do detail analysis of app usage and this mistake most of developer do at initial level.

Following is a simple flurry analytics example to raise event with properties

//Hashmap for event properties
Map<String, String> productParams = new HashMap<String, String>();
//adding event properties associated with an event
productParams.put("product_price", "100");
productParams.put("product_name", "iphone"); productParams.put("product_id", "pd_87fjhh");

//finally log the event along with its properties eventFlurryAgent.logEvent("product_click", productParams);

User and User properties

User properties are attributes you define to describe segments of your user base, such as language preference or geographic location. Analytics tools automatically logs some user properties like geo location, network etc.

These user properties are extremely important because based on these you will define segments i.e. user groups whom you can latter target with email, notifications or other ways

Now lets consider an example for a food app a possible user property can be favorite_food and here is firebase example to add a user property

mFirebaseAnalytics.setUserProperty("favorite_food", mFavoriteFood);

Session UTM’s

Session utm’s define how user has come to particular page in your app. It generally used to track traffic coming to your app.

User can come to particular page of app by clicking notification or by clicking a deep link those who don’t have idea what deep link is please read this https://clearbridgemobile.com/7-benefits-of-mobile-app-deep-linking/

Now session UTM consist of three attributes

1]utm_source: Identifies source from where user came like facebook app or web browser

2]utm_medium: This UTM code specifies the medium, like cpc or newsletter, for example. If your source is Facebook, you might use the label “social” to indicate the traffic came from social media

3]utm_campaign: The campaign name parameter allows you to track the performance of a specific campaign. For example, you can use the campaign parameter to differentiate traffic between different Facebook Ad campaigns or email campaigns.

Some anlytics tools support tracking UTM’s separately but in case they are not supported you can send utm attributes as event properties.

Page views

This is the number of pages that people have viewed in total. In the old days, we called these “hits.

Every time a user visits a page you can raise page view and page views can also have properties like name of page, time user stayed on page, utm_source, utm_medium, utm_campaign etc.

Few analytics tools does not support adding properties to page_views in such case you can raise page_view as an event along with properties

following is flurry example

FlurryAgent.onPageView()

Install Tracking

Tracking mobile attribution, or where your users came from before they installed your app. For example user looked at ad on facebook clicked on it and installed your app.

Most of analytics tools provides this feature automatically you don’t have to do much other than adding few lines of code. You can have customised implementation for install tracking.

Install tracking has following important attributes

1]utm source

2]utm medium

3]utm campaign

4]utm term

Thats it, so these are some important things you need to check and implement while adding analytics to your app. Make sure you have everything implemented mentioned above before making your app live. It is very important to know who are my app users, what are they doing and how to target them.

--

--