Platform

AI

AI Agents
Sense, decide, and act faster than ever before
AI Visibility
See how your brand shows up in AI search
AI Feedback
Distill what your customers say they want
Amplitude MCP
Insights from the comfort of your favorite AI tool

Insights

Product Analytics
Understand the full user journey
Marketing Analytics
Get the metrics you need with one line of code
Session Replay
Visualize sessions based on events in your product
Heatmaps
Visualize clicks, scrolls, and engagement

Action

Guides and Surveys
Guide your users and collect feedback
Feature Experimentation
Innovate with personalized product experiences
Web Experimentation
Drive conversion with A/B testing powered by data
Feature Management
Build fast, target easily, and learn as you ship
Activation
Unite data across teams

Data

Warehouse-native Amplitude
Unlock insights from your data warehouse
Data Governance
Complete data you can trust
Security & Privacy
Keep your data secure and compliant
Integrations
Connect Amplitude to hundreds of partners
Solutions
Solutions that drive business results
Deliver customer value and drive business outcomes
Amplitude Solutions →

Industry

Financial Services
Personalize the banking experience
B2B
Maximize product adoption
Media
Identify impactful content
Healthcare
Simplify the digital healthcare experience
Ecommerce
Optimize for transactions

Use Case

Acquisition
Get users hooked from day one
Retention
Understand your customers like no one else
Monetization
Turn behavior into business

Team

Product
Fuel faster growth
Data
Make trusted data accessible
Engineering
Ship faster, learn more
Marketing
Build customers for life
Executive
Power decisions, shape the future

Size

Startups
Free analytics tools for startups
Enterprise
Advanced analytics for scaling businesses
Resources

Learn

Blog
Thought leadership from industry experts
Resource Library
Expertise to guide your growth
Compare
See how we stack up against the competition
Glossary
Learn about analytics, product, and technical terms
Explore Hub
Detailed guides on product and web analytics

Connect

Community
Connect with peers in product analytics
Events
Register for live or virtual events
Customers
Discover why customers love Amplitude
Partners
Accelerate business value through our ecosystem

Support & Services

Customer Help Center
All support resources in one place: policies, customer portal, and request forms
Developer Hub
Integrate and instrument Amplitude
Academy & Training
Become an Amplitude pro
Professional Services
Drive business success with expert guidance and support
Product Updates
See what's new from Amplitude

Tools

Benchmarks
Understand how your product compares
Templates
Kickstart your analysis with custom dashboard templates
Tracking Guides
Learn how to track events and metrics with Amplitude
Maturity Model
Learn more about our digital experience maturity model
Pricing
LoginContact salesGet started

AI

AI AgentsAI VisibilityAI FeedbackAmplitude MCP

Insights

Product AnalyticsMarketing AnalyticsSession ReplayHeatmaps

Action

Guides and SurveysFeature ExperimentationWeb ExperimentationFeature ManagementActivation

Data

Warehouse-native AmplitudeData GovernanceSecurity & PrivacyIntegrations
Amplitude Solutions →

Industry

Financial ServicesB2BMediaHealthcareEcommerce

Use Case

AcquisitionRetentionMonetization

Team

ProductDataEngineeringMarketingExecutive

Size

StartupsEnterprise

Learn

BlogResource LibraryCompareGlossaryExplore Hub

Connect

CommunityEventsCustomersPartners

Support & Services

Customer Help CenterDeveloper HubAcademy & TrainingProfessional ServicesProduct Updates

Tools

BenchmarksTemplatesTracking GuidesMaturity Model
LoginSign Up

What SDKs Do You Need to Understand User Behavior?

Amplitude’s open source SDK integrates with your app to transmit user behavior and the context around that behavior back to Amplitude for analysis
Product

Sep 22, 2016

8 min read

Alicia Shiu

Alicia Shiu

Former Growth Product Manager, Amplitude

What SDKs Do You Need to Understand User Behavior?

Integrating Amplitude into your app can give you insights into how users are interacting with your app and what features are driving your retention. Various open source SDKs are available depending on your app, but first let’s go through some of the important customizations you’ll need to make.

If you already know all about how Amplitude tracks events, users, and sessions, then scroll down to the end to start the installation. If not, read on!

What Does The Amplitude SDK Do?

Amplitude’s open source SDK integrates with your app to transmit user behavior and the context around that behavior back to Amplitude for analysis. That includes:

  • Event tracking that follows users’ actions and completion of set milestones
  • Information like app version, phone model, operating system version, and carrier information to drive lead retention
  • Tracking revenue to optimize advertising campaigns

Before You Begin

Every app needs a unique SDK, and there are many choices to be made when deciding how to customize yours. The first choice is what questions do you want to answer? Setting goals for how integrating Amplitude will help you increase customer retention will set the structure for what user actions you need. These are a few questions you should ask yourself to get started:

  • What events correspond with your business goals? These goals shape the company and metrics that you care about measuring. You should be aligning and tracking events that work towards these goals.
  • Do you need cross-platform instrumentation? If your application is available on multiple platforms, you’ll need to decide on how to process the data. If your focus is on differentiating how users interact on different platforms, then you won’t need to track users outside of each individual platform. If you’re more interested in overall user behavior, then you’ll want to be able to track if users move from one platform to another via cross-platform tracking.
  • How are users identified and how will this give insights into user behavior? Especially when tracking users across multiple platforms, you need to make a conscious decision on how you configure user identification. You also need to be aware of potential user tracking complications to ensure that you collect data that accurately reflects behavior.
    The three basic units of mobile analytics are events, users, and sessions. Let’s go into a bit more detail on each because Amplitude uses these terms in a specific way. You’ll want to be familiar with each one before you dive into the SDK for your platform.

Tracking Events

Amplitude is an event-based analytics platform, so strategically choosing which events to send can determine whether you get the full value from your data. Events are defined as user actions taken within your app. Depending on how you define them, events can be anything from the pushing of a button, the processing of a payment, or the tapping of the screen in a certain region of pixels. Your business goals should be the foundation for any decisions you make. Here are a few tips to follow when choosing events:

  • Determine Event and User Properties: Properties are specific attributes of events or users that can be measured. For example you may want to determine how much of your onboarding video new users watch before clicking away or moving to the next step. This is defined as an event property and can be tracked.
  • Make sure you organize events and related properties. Once you start adding more and more events and their corresponding properties it can get very complicated very fast. Keeping an organized spreadsheet will make sure you have something you and your team can refer back to. You can download the Event Taxonomy Template here to help you get started.
    Most importantly, don’t start tracking everything at once. Prioritize your events and start with the most important ones first. By focusing on the events that provide the most value, you can make the most of your time and then add in more events as your business and user base grows.

Identifying Users

There are three different terms used to refer to users. They help determine the type of user and how their actions are recorded in the data.

  • Active User: A user who has logged at least one action on a particular day.
  • New User: A user who has logged an action for the first time.
  • Unique User: A distinct individual to which actions are attributed. Properly tracking unique users will ensure that you are collecting accurate data.
    Unique users are given and identified by an amplitude_id which is used throughout Amplitude dashboards. This amplitude_id is determined by gathering device_id and user_id information.
  • device_id: This is determined by the IDFV of the device and ensures that within a specific device, the identification for each unique user won’t change. You can also choose to use the Advertising Identifier (IDFA for iOS and ADID for Android), which persists across all installs on multiple devices. It is useful for tracking users across different devices, giving information on cross-device usage and retention. The downside is that this Identifier can be changed if users limit ad tracking, creating a completely new unique user.
  • user_id: Set to a specific identifier for each user. You can choose to use username, email address or any other internal unique identifier. However if the identifier is changed a new user_id is assigned, so it’s best to use something that is not likely to change.
    When assigning an amplitude_id to an event, user_id is prioritized over device_id. Specific examples of this can be seen here.

Tracking Sessions

A session is a period of time that a user has your app in the foreground. The default setting groups sessions within five minutes of each other into a single session. The default settings for tracking sessions include:

  • Starting a new session when the app is launched in the foreground
  • Creating a new session if the app comes back into the foreground after five minutes of being in the background
  • Logging a new session if an event is recorded while the app is in the background after five minutes
    These settings can be changed to more accurately reflect the average usage of your app. For example if your app sends users periodic push notifications that they have to clear by opening the app, that would count as a new session. To present a more accurate picture of app usage, you can log these events as out of session by changing the parameters.

Best Practices

Now that you see the structure of Amplitude’s SDK, here are some basic principles of data and testing to keep in mind as you go about integrating Amplitude with your app.

  • Keep test and production data separate. It’s good practice to test every feature out fully to filter for potential issues before integrating it into your actual app. This ensures you don’t corrupt your data with faulty code.
  • Keep mobile and web separate as well. Just like you wouldn’t use the same code to implement your app on mobile and web, you also shouldn’t be using the same instrumentation across the board. Your users will also be interacting with your mobile and web apps differently and you need to account for that in your SDK design.
  • Don’t get ahead of yourself. Each event or user shouldn’t have more than 20 associated properties. Any more and you should be making a new event instead.

SDKs

When you’re ready, click through to the Github page for your platform’s SDK, clone it, and get going!

  • iOS / Swift
  • Android
  • JavaScript
  • Unity
  • Segment

For more on setting up, launching, and making your mobile app sticky, check out our Mobile Analytics resource page.

About the author
Alicia Shiu

Alicia Shiu

Former Growth Product Manager, Amplitude

More from Alicia

Alicia is a former Growth Product Manager at Amplitude, where she worked on projects and experiments spanning top of funnel, website optimization, and the new user experience. Prior to Amplitude, she worked on biomedical & neuroscience research (running very different experiments) at Stanford.

More from Alicia
Topics
Platform
  • Product Analytics
  • Feature Experimentation
  • Feature Management
  • Web Analytics
  • Web Experimentation
  • Session Replay
  • Activation
  • Guides and Surveys
  • AI Agents
  • AI Visibility
  • AI Feedback
  • Amplitude MCP
Compare us
  • Adobe
  • Google Analytics
  • Mixpanel
  • Heap
  • Optimizely
  • Fullstory
  • Pendo
Resources
  • Resource Library
  • Blog
  • Product Updates
  • Amp Champs
  • Amplitude Academy
  • Events
  • Glossary
Partners & Support
  • Contact Us
  • Customer Help Center
  • Community
  • Developer Docs
  • Find a Partner
  • Become an affiliate
Company
  • About Us
  • Careers
  • Press & News
  • Investor Relations
  • Diversity, Equity & Inclusion
Terms of ServicePrivacy NoticeAcceptable Use PolicyLegal
EnglishJapanese (日本語)Korean (한국어)Español (Spain)Português (Brasil)Português (Portugal)FrançaisDeutsch
© 2025 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.

Recommended Reading

article card image
Read 
Product
Getting Started: Product Analytics Isn’t Just for Analysts

Dec 5, 2025

5 min read

article card image
Read 
Insights
Vibe Check Part 3: When Vibe Marketing Goes Off the Rails

Dec 4, 2025

8 min read

article card image
Read 
Customers
How CAFU Tripled Engagement and Boosted Conversions 20%+

Dec 4, 2025

8 min read

article card image
Read 
Customers
The Future is Data-Driven: Introducing the Winners of the Ampy Awards 2025

Dec 2, 2025

6 min read

Explore Related Content

Integration
Using Behavioral Analytics for Growth with the Amplitude App on HubSpot

Jun 17, 2024

10 min read

Personalization
Identity Resolution: The Secret to a 360-Degree Customer View

Feb 16, 2024

10 min read

Product
Inside Warehouse-native Amplitude: A Technical Deep Dive

Jun 27, 2023

15 min read

Guide
5 Proven Strategies to Boost Customer Engagement

Jul 12, 2023

Video
Designing High-Impact Experiments

May 13, 2024

Startup
9 Direct-to-consumer Marketing Tactics to Accelerate Ecommerce Growth

Feb 20, 2024

10 min read

Growth
Leveraging Analytics to Achieve Product-Market Fit

Jul 20, 2023

10 min read

Product
iFood Serves Up 54% More Checkouts with Error Message Makeover

Oct 7, 2024

9 min read

Blog
InsightsProductCompanyCustomers
Topics

101

AI

APJ

Acquisition

Adobe Analytics

Amplify

Amplitude Academy

Amplitude Activation

Amplitude Analytics

Amplitude Audiences

Amplitude Community

Amplitude Feature Experimentation

Amplitude Guides and Surveys

Amplitude Heatmaps

Amplitude Made Easy

Amplitude Session Replay

Amplitude Web Experimentation

Amplitude on Amplitude

Analytics

B2B SaaS

Behavioral Analytics

Benchmarks

Churn Analysis

Cohort Analysis

Collaboration

Consolidation

Conversion

Customer Experience

Customer Lifetime Value

DEI

Data

Data Governance

Data Management

Data Tables

Digital Experience Maturity

Digital Native

Digital Transformer

EMEA

Ecommerce

Employee Resource Group

Engagement

Event Tracking

Experimentation

Feature Adoption

Financial Services

Funnel Analysis

Getting Started

Google Analytics

Growth

Healthcare

How I Amplitude

Implementation

Integration

LATAM

Life at Amplitude

MCP

Machine Learning

Marketing Analytics

Media and Entertainment

Metrics

Modern Data Series

Monetization

Next Gen Builders

North Star Metric

Partnerships

Personalization

Pioneer Awards

Privacy

Product 50

Product Analytics

Product Design

Product Management

Product Releases

Product Strategy

Product-Led Growth

Recap

Retention

Startup

Tech Stack

The Ampys

Warehouse-native Amplitude