How to Track In-App Events Correctly (Complete Guide)

In-app event tracking powers attribution, optimization, and analytics. Learn what to track, how to implement it, and common mistakes to avoid.

Justin Sampson
How to Track In-App Events Correctly (Complete Guide)

How to Track In-App Events Correctly (Complete Guide)

Installs tell you someone downloaded your app. In-app events tell you what they did after.

Without event tracking, you're flying blind. You can't optimize toward value, measure retention, or understand user behavior.

Here's how to implement event tracking that actually drives decisions.

What Are In-App Events?

In-app events are actions users take within your app that you choose to measure.

Examples:

  • Tutorial completed
  • Account created
  • Product viewed
  • Item added to cart
  • Purchase completed
  • Subscription started
  • Level completed
  • Content shared

Every event you track generates data you can use for attribution, optimization, and analytics.

Why Event Tracking Matters

For attribution:

Ad networks need post-install data to optimize. Without events, they can only optimize toward installs, not valuable users.

For optimization:

You can't improve what you don't measure. Events show where users drop off and what drives conversion.

For analytics:

Understanding user behavior requires knowing what actions they take and in what sequence.

For monetization:

Revenue events let you calculate LTV, ROAS, and payback periods.

What to Track

Don't track everything. Track events that matter for business decisions.

Core Events (Every App Should Track)

1. Tutorial complete

Indicates successful onboarding. Strong predictor of retention.

2. First meaningful action

The core action that delivers value (first search, first post, first workout logged).

3. Account creation

Separates anonymous users from activated users.

4. First purchase / subscription

Critical monetization milestone.

5. Day 3, Day 7, Day 30 sessions

Retention markers that predict LTV.

Monetization Events

E-commerce apps:

  • Product viewed
  • Add to cart
  • Checkout initiated
  • Purchase completed
  • Revenue value

Subscription apps:

  • Trial started
  • Subscription began
  • Renewal (monthly, annual)
  • Cancellation
  • Subscription tier

Ad-monetized apps:

  • Ad impression
  • Ad click
  • Rewarded ad completed

Engagement Events

Content apps:

  • Article read
  • Video watched (% completion)
  • Content shared
  • Comment posted

Social apps:

  • Profile created
  • Friend added
  • Post created
  • Message sent

Fitness/Health apps:

  • Workout logged
  • Goal set
  • Achievement unlocked
  • Streak milestone (7 day, 30 day)

Gaming apps:

  • Level completed
  • Achievement unlocked
  • In-game purchase
  • Daily login

Event Naming Conventions

Consistent naming prevents chaos as your app scales.

Format: action_object or object_action

Good examples:

  • purchase_completed
  • tutorial_completed
  • subscription_started
  • product_viewed
  • cart_abandoned

Bad examples:

  • Purchase (not descriptive enough)
  • User completed the tutorial successfully (too verbose)
  • tut_comp (unclear abbreviation)
  • PURCHASE_COMPLETE (inconsistent casing)

Standard: Pick one convention and enforce it across all events.

Event Parameters

Events can include additional data that provides context.

Purchase event parameters:

trackEvent("purchase_completed", {
  revenue: 29.99,
  currency: "USD",
  product_id: "premium_monthly",
  quantity: 1,
  category: "subscription"
});

Product viewed parameters:

trackEvent("product_viewed", {
  product_id: "running-shoes-123",
  product_name: "Ultra Runner Pro",
  category: "footwear",
  price: 129.99
});

Level completed parameters:

trackEvent("level_completed", {
  level_number: 5,
  time_spent: 180,
  score: 8500,
  difficulty: "hard"
});

Parameters enable segmentation and analysis you can't do with events alone.

Implementation

Event tracking happens in your app code using your MMP SDK.

AppsFlyer Example

// iOS (Swift)
AppsFlyerLib.shared().logEvent("purchase_completed", 
  withValues: [
    AFEventParamRevenue: 29.99,
    AFEventParamCurrency: "USD",
    AFEventParamContentId: "premium_monthly"
  ]
)
// Android (Java)
Map<String, Object> eventValues = new HashMap<>();
eventValues.put(AFInAppEventParameterName.REVENUE, 29.99);
eventValues.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValues.put(AFInAppEventParameterName.CONTENT_ID, "premium_monthly");

AppsFlyerLib.getInstance().logEvent(
  getApplicationContext(),
  "purchase_completed",
  eventValues
);

Adjust Example

// iOS (Swift)
let event = ADJEvent(eventToken: "abc123")
event?.setRevenue(29.99, currency: "USD")
event?.addCallbackParameter("product_id", value: "premium_monthly")
Adjust.trackEvent(event)
// Android (Java)
AdjustEvent event = new AdjustEvent("abc123");
event.setRevenue(29.99, "USD");
event.addCallbackParameter("product_id", "premium_monthly");
Adjust.trackEvent(event);

Firebase Analytics Example

// iOS (Swift)
Analytics.logEvent("purchase_completed", parameters: [
  "revenue": 29.99,
  "currency": "USD",
  "product_id": "premium_monthly"
])
// Android (Java)
Bundle params = new Bundle();
params.putDouble("revenue", 29.99);
params.putString("currency", "USD");
params.putString("product_id", "premium_monthly");
mFirebaseAnalytics.logEvent("purchase_completed", params);

Where to Trigger Events

Place event tracking code immediately after the action completes successfully.

Purchase flow:

func completePurchase(productId: String, price: Double) {
  // Process payment
  processPayment(productId: productId, price: price)
  
  // After successful payment:
  trackEvent("purchase_completed", [
    "revenue": price,
    "product_id": productId
  ])
}

Tutorial completion:

func onTutorialComplete() {
  // Mark tutorial as complete
  userDefaults.set(true, forKey: "tutorial_completed")
  
  // Track event
  trackEvent("tutorial_completed")
  
  // Navigate to main screen
  navigateToHome()
}

Critical: Track after the action succeeds, not before. Otherwise you'll count failed attempts as completions.

Testing Event Tracking

Before launching campaigns based on events:

1. Test in development

  • Trigger each event manually
  • Verify it appears in your MMP dashboard (test mode)
  • Check that parameters pass correctly

2. Test in production (before campaigns)

  • Perform actions in the production app
  • Verify events appear in dashboard within 1-2 minutes
  • Confirm parameters are accurate

3. Test postbacks

  • Verify ad networks receive event postbacks
  • Check that SKAN conversion values update based on events
  • Confirm timing and attribution logic work correctly

Common Mistakes

Tracking too many events:

Tracking 50+ events creates noise. Focus on 10-15 that matter for decisions.

Tracking before the action completes:

Don't fire "purchase_completed" before payment processes. You'll overcount.

Inconsistent naming:

PurchaseComplete, purchase_completed, purchase-complete are three different events in your system.

Missing revenue parameters:

Revenue events without revenue and currency parameters can't calculate ROAS.

Not testing:

Deploying tracking code without verification leads to broken campaigns.

Tracking PII (Personally Identifiable Information):

Never pass email, name, phone number in event parameters. Violates privacy policies.

Conversion Events vs. Analytics Events

Not all events need to trigger attribution postbacks.

Conversion events:

  • Sent to ad networks via postbacks
  • Used for campaign optimization
  • Should be high-value actions (purchase, subscription, registration)
  • Cost money (some MMPs charge per conversion event)

Analytics events:

  • Only visible in your MMP dashboard
  • Used for internal analysis
  • Can be any action
  • Typically free or unlimited

Configure which events are "conversion events" in your MMP settings.

SKAN Event Mapping

For iOS campaigns, map events to conversion values (0-63).

Example schema:

  • Value 0: Install only
  • Value 5: Tutorial completed
  • Value 10: Account created
  • Value 20: First purchase (< $10)
  • Value 30: First purchase ($10-50)
  • Value 40: First purchase ($50+)
  • Value 50: Subscription started

Configure this in your MMP's SKAN conversion studio.

Event Volume Monitoring

Check your dashboard weekly:

Red flags:

  • Event volume drops 30%+ suddenly (tracking broke)
  • Completion rate changes dramatically (implementation issue)
  • Event fires 10x more than expected (double-tracking)

Green flags:

  • Consistent event volume week-over-week
  • Completion rates align with user flows
  • Events scale proportionally with installs

Privacy Considerations

What you can track:

  • Actions users take in your app
  • Revenue amounts and transaction IDs
  • Content interactions and engagement

What you shouldn't track:

  • Personally identifiable information (email, phone, name)
  • Sensitive data (health info, financial details, location unless consented)
  • Data users haven't consented to share

Follow platform guidelines (Apple's ATT, Google's data policies) and regional laws (GDPR, CCPA).

FAQs

How many events should I track?

Start with 5-10 core events: install, tutorial complete, account created, first purchase, key retention markers. Add more as needed for specific analyses, but avoid tracking everything.

Do events work on both iOS and Android?

Yes. Use the same event names across platforms for consistent reporting. Your MMP aggregates data from both.

How long does it take for events to appear in the dashboard?

Real-time to 2 minutes for most MMPs. SKAN events can take 24-72 hours due to Apple's delayed postbacks.

Can I track events without an MMP?

Yes, using Firebase Analytics, Mixpanel, Amplitude, or custom solutions. But you won't get attribution or the ability to optimize ad campaigns based on events.

Should I track revenue in cents or dollars?

Dollars (or base currency units). Most MMPs expect revenue as decimal values: 29.99, not 2999.


Event tracking is the foundation of data-driven app growth. Implement it correctly from day one, and you'll have the data you need to optimize every part of your user acquisition and retention strategy.

in-app eventsevent trackingmobile analyticsMMPconversion tracking

Related Resources