The mobile app market became really competitive in the last year, as a recent TechCrunch article stated. The costs for visibility in a market with hundred of thousands of competitors is increasing steadily. The marketing costs for one successful install (cost-per-install, or short CPI) of your app is on the rise. According to recent numbers by W3i the marketing cost for an installed Android app in June 2012 has risen from $0.30 to $0.51. On iOS the CPI has increased from $0.59 to $0.92.
As a matter of fact, it is of crucial importance for app developers and publishers to track and analyze their successfully installed apps. Since most platform SDKs do not support rich app tracking and analysis, several vendors offer additional technologies and services, such as Google Analytics SDK for Android apps or Localytics. These technologies allow the real-time collection and analysis of user engagement data, such as active installs, location information, feature usage or in-app purchases. As an additional benefit, Google Analytics SDK for Android allows the seamless integration of native app tracking into your familiar Google Analytics dashboard. This integration also gives publishers the tools to monitor the success of their mobile marketing campaigns in combination with their Web engagements. For app publishers this technologies provide a powerful platform to measure and optimize all application marketing efforts.
Within this tutorial we will describe the stepwise process of integrating Google Analytics tracking into a native Android application.
Step 1: Download Google Analytics Android SDK
In a first step download the Google Analytics Android SDK. This SDK contains a libGoogleAnalytics.jar that you have to copy into your /libs/ folder of your Android project. In order to track the user activities within your Analytics dashboard it is necessary to add following permissions to your already existing AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Step 2: Create Analytics Tracking ID
Before you can track the activity of your users within the Analytics dashboard you have to set up a new Web tracking property ID (of course this is not a Web site, but will refer to the stats for your mobile application).
A Web property ID is also known as the UA number of your tracking code and looks like
UA-xxxxx-yy
, where the x’s and y’s indicate the unique numbers for your profile. You must indicate the web property ID you’d like to use when instantiating the tracking object. See Web Property for more information.
Step 3: Integrate Analytics Tracker into Android App
Integrate Google Analytics Tracker SDK into your Android app by accessing the tracker singleton as follows (Don’t forget to change my Analytics Tracking ID by your own ID):
package at.smartlab.androidbook.testandroidtracking; import com.google.android.apps.analytics.GoogleAnalyticsTracker; import android.app.Activity; import android.os.Bundle; public class TestAndroidTrackingActivity extends Activity { GoogleAnalyticsTracker tracker; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tracker = GoogleAnalyticsTracker.getInstance(); tracker.setDebug(true); // Start the tracker (REPLACE my Analytics id with your own ID!! tracker.startNewSession("UA-8874494-2", this); tracker.trackEvent( "Clicks", // Category "Button", // Action "clicked", // Label 77); // Value tracker.trackPageView("/testApplicationHomeScreen"); tracker.dispatch(); } @Override protected void onStop() { super.onStop(); // Stop the tracker when it is no longer needed. tracker.stopSession(); } }
Step 4: Track Application Installs
Track your application installs in detail by adding following receiver in your AndroidManifest.xml file:
<!-- Used for install referrer tracking --> <receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver>
Alternative: Localytics
Localytics is built for mobile & tablet apps. Integration is easy, takes just 10 minutes and requires only a few lines of code. A quick integration allows you to track all standard metrics such as platform, device type, sessions and unique users. Event and screen tracking are used to analyze conversion funnels, screen flows, feature usage, content access, advertising performance, etc. Full support for iOS, Android, BlackBerry, Windows Phone and HTML5 apps.
Localytics is designed to measure apps, providing the greatest possible accuracy and lightest footprint. Applications are different than websites, offering richer experiences and a deeper integration with the device. Apps function offline, survive intermittent network connectivity, support multitasking and access location services, storage, accelerometers, network details and more. Localytics collects and combines rich data to help you build more successful applications.
all the time i used to read smaller articles that also clear their motive,
and that is also happening with this piece of writing which I am reading at
this place.
I am truly glad to read this web site posts which contains
tons of useful information, thanks for providing these information.
Hiya very nice website!! Man .. Beautiful ..
Wonderful .. I’ll bookmark your website and take
the feeds additionally? I’m glad to seek out so many helpful information right here within the post, we want work out extra techniques in this
regard, thanks for sharing. . . . . .
At this moment I am ready to do my breakfast, once having my breakfast coming yet again to read additional news.
Thanks for any other magnificent article. The place else could anybody get that
kind of information in such a perfect method of writing?
I’ve a presentation next week, and I am at the search for
such info.
What’s Taking place i’m new to this, I stumbled upon this I’ve found It absolutely helpful and
it has helped me out loads. I’m hoping to give a contribution & assist other customers like its helped me.
Good job.
Hi there to every one, since I am truly eager of reading this blog’s
post to be updated daily. It consists of fastidious stuff.
This design is wicked! You obviously know how to keep a reader amused.
Between your wit and your videos, I was almost moved to start my own blog (well,
almost…HaHa!) Great job. I really loved what you had to say, and more than that, how you presented it.
Too cool!
Superb post however , I was wanting to know if you could write a litte
more on this subject? I’d be very grateful if you could elaborate a
little bit more. Cheers!
At this time I am going away to do my breakfast, afterward having my
breakfast coming yet again to read additional news.
Hmm is anyone else encountering problems with the images
on this blog loading? I’m trying to determine if its a problem on my end or
if it’s the blog. Any feedback would be greatly appreciated.
Hello! I just wanted to ask if you ever have any problems
with hackers? My last blog (wordpress) was hacked and
I ended up losing several weeks of hard work due to no back
up. Do you have any solutions to protect against hackers?
I recently tried CBD gummies after the prime time and was pleasantly surprised past the results. Initially skeptical, I create that it significantly helped with my dread and slumber issues without any notable side effects. The fuel was effortless to speak, with nitid dosage instructions. It had a indulgent, earthy grain that was not unpleasant. Within a week, I noticed a signal convalescence in my all-inclusive well-being, feeling more relaxed and rested. I cognizant the natural technique to wellness CBD offers and aim to continue using it.
Hello there, I found your blog by the use of Google
at the same time as searching for a similar matter,
your web site came up, it seems to be great.
I have bookmarked it in my google bookmarks.
Hello there, simply become aware of your blog through Google, and located that it is truly informative.
I am going to watch out for brussels. I’ll be grateful if you
proceed this in future. Many folks shall be benefited
out of your writing. Cheers!
When I originally commented I appear to have clicked on the -Notify me when new comments are added- checkbox
and from now on each time a comment is added I
get 4 emails with the same comment. There has to be a way you can remove me from that service?
Kudos!
It’s perfect time to make some plans for the future and
it is time to be happy. I have read this post and if I
could I want to suggest you few interesting things or suggestions.
Perhaps you could write next articles referring to this
article. I want to read even more things about it!
I am really enjoying the theme/design of your web site.
Do you ever run into any browser compatibility issues?
A handful of my blog audience have complained about my site not working correctly in Explorer but looks
great in Chrome. Do you have any tips to help fix this problem?