Implement Amplitude on your Mobile App

Non-Poppin Jid
TakoDigital
Published in
3 min readNov 22, 2023

What is Amplitude?

Amplitude is a powerful product analytics platform that enables you to build better products by tracking and understanding user behavior.

With Amplitude, you can track user data and gain insights into user engagement, retention, and revenue. Amplitude keeps your data trustworthy and secure, ensuring that you have access to accurate and reliable information. Amplitude offers powerful analytics tools that help answer questions about what happened, why it happened, and which actions to take next. With Amplitude, you can seamlessly share your work across teams, facilitating collaboration and driving growth.

Get Start

Sign Up and create your account first

Select your platform

In this case i’ve select Android SDK

Setup Android SDK

save your API key

on your build.gradle file

dependencies {
implementation 'com.amplitude:analytics-android:1.+
}

Add permission on AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

On your project MainActivity.kt

import com.amplitude.android.Amplitude
import com.amplitude.android.Configuration
import com.amplitude.android.DefaultTrackingOptions

val amplitude = Amplitude(
Configuration(
apiKey = "xxx",
context = applicationContext,
defaultTracking = DefaultTrackingOptions.ALL,
)
)

And then create your view

val txtClick = findViewById<TextView>(R.id.txtClick)
txtClick.setOnClickListener{
amplitude.track("NonJid")
}

And boom!!!

Select your chart

Save as dashboard

Create your dashboard

Enjoy!!!

Bonus

You can filter event that you want

ex: filter any event and see on dashboard

click View User Steams

You’ll see all of your event that you click on your app and that can see an detail of your device to use this tracking event to make something to your marketing take it to make statistics for your product.

Thanks 🤩 😍 😊

Ref:

--

--

Non-Poppin Jid
TakoDigital

Android & IOS Developer at MACO , Member DManiac MegaCrew Thailand — >>arnon010@hotmail.com