Respectlytics Respect lytics
Menu
Event Naming Conventions Analytics SDK Setup Mobile App Telemetry

Event Naming Best Practices
for Mobile Analytics

โ€ข 10 min read

Event naming best practices for mobile analytics: Use snake_case with an object_action pattern (e.g., screen_viewed, purchase_completed). Add namespace prefixes to group related events (checkout_, onboarding_). Never embed dynamic values in event names. Document every event in a shared dictionary.

๐ŸŽฏ Why Event Naming Matters More Than You Think

In most analytics platforms, event names are one of dozens of fields you can customize. You might spend hours debating what properties to attach, what user attributes to capture, what segments to create.

In minimal-data architecturesโ€”where you deliberately limit what you collectโ€”event names carry all the semantic weight. They're not just labels; they're your entire vocabulary for understanding user behavior.

The 5-Field Reality

When your analytics stores only essential fieldsโ€”event name, timestamp, session ID, platform, and countryโ€”the event name becomes critical:

  • โ€ข No custom properties to add context later
  • โ€ข No user attributes to segment by
  • โ€ข No retroactive fixesโ€”bad names stay bad

Get event naming right, and your analytics becomes a clear window into user behavior. Get it wrong, and you're staring at a list of meaningless strings.

๐Ÿ“ The Right Naming Format: snake_case + object_action

After analyzing thousands of event implementations, one pattern consistently produces the cleanest, most maintainable analytics: snake_case with an object_action structure.

Format Example Verdict
snake_case (recommended) purchase_completed โœ“ Best
camelCase purchaseCompleted โš  Avoid
PascalCase PurchaseCompleted โš  Avoid
Spaces Purchase Completed โœ— Never
kebab-case purchase-completed โš  Avoid

Why snake_case Wins

  • โ€ข Database-friendly: Works in SQL queries without escaping
  • โ€ข Sortable: Alphabetical sorting groups related events
  • โ€ข Readable: Clear word boundaries at a glance
  • โ€ข Universal: Works across iOS, Android, web, and backend systems

The object_action Pattern

Structure your events as what was acted upon, followed by what happened:

โœ“ Good (object_action)

  • screen_viewed
  • button_tapped
  • purchase_completed
  • form_submitted
  • search_performed

โœ— Avoid (action_object or vague)

  • viewed_screen
  • tap
  • buy
  • submit
  • user_action

๐Ÿ—‚๏ธ Namespace Prefixes for Organization

As your app grows, you'll have dozens of events. Without organization, your event list becomes unmanageable. Namespace prefixes solve this by grouping related events.

Feature Area Prefix Example Events
Onboarding onboarding_ onboarding_started, onboarding_step_completed, onboarding_finished
Checkout checkout_ checkout_started, checkout_payment_entered, checkout_completed
Settings settings_ settings_opened, settings_notification_toggled, settings_theme_changed
Search search_ search_performed, search_result_tapped, search_filter_applied
Profile profile_ profile_viewed, profile_edited, profile_photo_updated

๐Ÿ’ก Pro Tip: Two-Level Namespaces

For larger apps, use two-level namespaces: checkout_payment_card_entered or onboarding_profile_photo_skipped. This keeps events organized even at scale.

โš ๏ธ 7 Common Event Naming Mistakes

1. Embedding Dynamic Values

Wrong: purchased_blue_widget, viewed_product_12345

Right: item_purchased, product_viewed

Dynamic values create thousands of unique events, making analysis impossible.

2. Inconsistent Tense

Wrong: button_click mixed with purchase_completed

Right: Always use past tense: button_tapped, purchase_completed

Events record what happened, not what's happening.

3. Being Too Granular

Wrong: Separate events for submit_button_tapped, cancel_button_tapped, back_button_tapped

Right: Single button_tapped event (context from screen/flow)

Too many events dilutes your data and makes dashboards unwieldy.

4. Being Too Vague

Wrong: action, event, user_action

Right: checkout_started, article_shared

Vague names require additional context you may not have.

5. Platform-Specific Language

Wrong: viewDidAppear, onActivityCreated

Right: screen_viewed (platform-agnostic)

Use terms that work across iOS, Android, and web.

6. Including PII in Event Names

Wrong: john_smith_logged_in, order_user123_placed

Right: login_completed, order_placed

Never put user identifiers, names, or IDs in event names.

7. No Documentation

Event names without definitions lead to confusion. Does checkout_completed fire before or after payment? When the button is tapped or when the server confirms? Document it.

๐Ÿ—๏ธ Building Your Event Taxonomy

A well-designed event taxonomy answers the questions that drive product decisions. Start with questions, then work backward to events.

Questions โ†’ Events Framework

Question:

"Where do users drop off in onboarding?"

Events needed:

onboarding_started, onboarding_step_completed, onboarding_finished

Question:

"Which features do people actually use?"

Events needed:

feature_used (one per key feature)

Question:

"What's our checkout conversion rate?"

Events needed:

checkout_started, checkout_completed

Question:

"Is search useful or broken?"

Events needed:

search_performed, search_result_tapped

๐Ÿ“‹ Event Templates by App Type

Here are starter templates for common app categories. Adapt to your specific flows.

๐Ÿ›’ E-commerce / Shopping App

Discovery
  • search_performed
  • category_viewed
  • product_viewed
Conversion
  • cart_item_added
  • checkout_started
  • checkout_completed

๐Ÿ“ฐ Content / Media App

Consumption
  • article_viewed
  • video_started
  • video_completed
Engagement
  • content_shared
  • content_saved
  • comment_posted

โšก Productivity / SaaS App

Onboarding
  • signup_completed
  • onboarding_started
  • onboarding_finished
Core Value
  • project_created
  • task_completed
  • export_generated

๐ŸŽฎ Gaming App

Progression
  • level_started
  • level_completed
  • achievement_unlocked
Monetization
  • store_opened
  • purchase_started
  • purchase_completed

๐Ÿ“– The Event Dictionary: Documentation That Works

An event dictionary is the single source of truth for your analytics. Without it, you'll have inconsistent implementations and unanswerable questions about what events mean.

Event Dictionary Template

Event Name When It Fires Question It Answers
onboarding_started User sees first onboarding screen How many sessions begin onboarding?
onboarding_finished User completes last onboarding step What's our onboarding completion rate?
checkout_started User taps "Checkout" from cart How many cart sessions convert?
checkout_completed Server confirms payment success What's our checkout conversion rate?

๐Ÿ’ก Keep It Simple

Store your event dictionary in a shared document (Notion, Confluence, even a README). The format matters less than having a single, accessible source of truth that everyone references.

๐Ÿ”„ Versioning and Migration

Eventually, you'll need to rename or restructure events. How do you handle this without breaking historical data?

Option 1: Add New, Deprecate Old

The safest approach: add the new event alongside the old one, run both for a transition period, then remove the old event.

Week 1-2: Ship new event checkout_completed alongside old purchase_done

Week 3-4: Update dashboards to use new event

Week 5+: Remove old event from codebase

Option 2: Version Suffixes (Use Sparingly)

For major restructures, version suffixes can help: checkout_completed_v2. But this gets messy fastโ€”prefer Option 1.

Warning: Avoid frequent renaming. Every change requires code updates across iOS, Android, and any other platforms. Get naming right upfront.

๐Ÿ’ก Why Event Naming Matters Even More with Respectlytics

Respectlytics stores only 5 fields per event: event name, timestamp, platform, country, and session ID. There are no custom properties to add context after the fact.

This constraint is intentionalโ€”it's the Return of Avoidance (ROA) approach. But it means your event names must be self-documenting. A well-named event like checkout_payment_failed tells you everything; a vague error tells you nothing.

โ“ Frequently Asked Questions

What is the best naming convention for analytics events?

Use snake_case with an object_action pattern: screen_viewed, button_tapped, purchase_completed. This format is readable, sortable, and works across all platforms without escaping issues.

How many analytics events should a mobile app track?

Most apps need 15-30 well-designed events. Track key user actions (signup, purchase, feature use), funnel steps (onboarding, checkout), and engagement indicators (content viewed, search performed). More events create noise; fewer miss insights.

Should analytics event names include dynamic values?

No. Never put dynamic values like user IDs, item names, or prices in event names. This creates thousands of unique events and makes analysis impossible. Use a fixed event name like item_purchased rather than purchased_blue_widget_29.99.

How do you organize analytics events by screen or feature?

Use namespace prefixes: onboarding_step_completed, checkout_payment_selected, settings_notification_toggled. This groups related events in alphabetical lists and makes ownership clear.

What are common mistakes in analytics event naming?

Common mistakes: using past tense inconsistently (clicked vs click), embedding dynamic data in names, being too granular (separate events for each button), being too vague (user_action), and not documenting what events mean.

Disclaimer:

This guide provides general best practices for event naming. The right approach depends on your app's specific features, team size, and analytics goals. Test different patterns and adapt to what works for your situation.

Related Resources

Ready to implement clean event tracking?

Respectlytics stores only 5 fields per eventโ€”making good naming essential and your data footprint minimal.