This document provides an overview of Google Analytics (GA) integration and reporting, compares GA to Flurry and Countly, and discusses integrating GA with Countly. It covers the fundamentals of GA including a brief history and free vs premium plans. It also provides step-by-step instructions for integrating the GA SDK for Android apps, tracking screens, events, crashes, and ecommerce data. Key differences between the analytics platforms are defined such as their support for sessions, custom dimensions/metrics, and social interactions.
2. 1. Introduction of GA
– Brief History
– Platform Fundamentals
2. GA Integration & Reporting
– Step by Steps
3. GA vs Flurry vs Countly
– Definition of Sessions
– APIs
4. Demo
Outline
13. Google Analytics SDK v4 for Android
• There are three steps to getting started with the
SDK:
1. Update AndroidManifest.xml
2. Initialize Trackers
3. Create a Configuration XML file
14.
15. Getting Started - Step 1
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="com.example.MyApp"> <!-- Replace with the custom app class when applicable -->
<!-- Add the following meta-data for devices running Google Play service. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
• Update AndroidManifest.xml
16. Getting Started - Step 2
• Initialize Trackers
// Get tracker.
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = analytics.newTracker(R.xml.global_tracker);
// Build and send an Event.
t.send(new HitBuilders.EventBuilder()
.setCategory(getString(categoryId))
.setAction(getString(actionId))
.setLabel(getString(labelId))
.build());
17. Getting Started - Step 3
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="ga_sessionTimeout">300</integer>
<bool name="ga_autoActivityTracking">true</bool>
<!-- The following value should be replaced with correct property id. -->
<string name="ga_trackingId">UA-52655185-1</string>
</resources>
• Create a Configuration XML file
More parameters: https://developers.google.com/analytics/devguides/collection/android/v4/parameters
18.
19. Screens (V4)
// Get tracker.
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = analytics.newTracker(R.xml.global_tracker);
t.setScreenName(“/homeScreen”);
t.send(new HitBuilders.AppViewBuilder().build());
21. Event Tracking (V4)
// Get tracker.
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = analytics.newTracker(R.xml.global_tracker);
// Build and send an Event.
t.send(new HitBuilders.EventBuilder()
.setCategory(“Videos”)
.setAction(“Play”)
.setLabel(“Gone With the Wind”)
.build());
22.
23. Crashes & Exceptions (V4)
// Get tracker.
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = analytics.newTracker(R.xml.global_tracker);
t.send(new HitBuilders.ExceptionBuilder()
.setDescription(“MyException”)
.setFatal(false).build());
!
Never send the exception message (e.getMessage()) to Google
Analytics as it may contain personally identifiable information.
• Caught Exception Measurement
• Uncaught Exception Measurement
<bool name="ga_reportUncaughtExceptions">true</bool>
29. Google Analytics Flurry CLCountly
Crashes &
Exceptions
V V
Ecommerce
V
(Enhanced Ecommerce)
(Support by Countly)
Event
V
(Key, Count)
(Key, Count, Sum)
(Key, Segmentation)
(Key, Count, Segmentation)
(Key, Count, Sum, Segmentation)
Custom
Dimensions &
Mertrics
Screens
V
(Automatic)
V
Sessions V
Social
Interactions
V
User ID
V
(Policy)
V
User Timings
V
(C, Value, N, L)
V
(Easier to use)