
Why Event Naming Matters
- If you have no process to event names β data inconsistency
- Devs use different names across iOS and Android β attribution breaks
- You track different variations of
signup_success
,userSignedUp
, andcompleted_signup
β makes finding specific behaviours difficult
Firebase accepts custom events. But your reports suffer without consistent practice. Want clean funnels? Consistent metrics? Long-term scalability?
Firebaseβs Rules for Custom Event Names
Firebase lets you create custom events, but it enforces some rules:
- Max length: 40 characters
- Only alphanumeric + underscores (e.g.,
button_click
, notbutton-click
) - Must start with a letter
- Cannot use reserved names (like
ad_click
,app_update
,first_open
)
β The Golden Rules of Firebase Event Naming
1. Be Verb-First
Start with the action, not the object.
Bad: product_view
Good: view_product
Bad: video_start
Good: start_video
This keeps the list alphabetised by user intent, not asset type.
2. Be Consistent Across Platforms
If Android fires submit_form
and iOS fires form_submit
, Firebase sees two events.
Fix: Maintain a shared event dictionary. One name, one meaning, one result.
3. Donβt Encode Parameters into Event Names
Stop doing this:
viewed_product_red_shoes_large
Instead:
logEvent('view_product', {
Β product_name: 'Red Shoes',
Β size: 'Large'
});
Use parameters for details, not your event name.
4. CamelCase or snake_case - Pick One
Donβt mix:
loginSuccess Β // camelCase
login_success // snake_case
Firebase doesnβt care, but it will make filtering in reports easier if you stick to one.
Example: Clean Event Naming for a Shopping App
Event: view_product
Parameters:Β product_id
, product_name
, category
Event: sign_up
Parameters:Β method
The pattern is simple:
Action_Object, with parameters adding the detail.
Debugging Tip: Use DebugView
Before you push events live, test in DebugView:
adb shell setprop debug.firebase.analytics.app your.package.name
This shows you exactly what Firebase is receiving.
β οΈ Naming Mistakes That Will Haunt You
- Duplicate events with different names β can't build simple funnels
- No naming convention β data becomes messy
- Parameters instead of events (or vice versa) β more messy data
- Tracking too many one-off events β sampling, quota issues
- No shared dictionary β chaos
Pro Tip: Create an Event Naming Convention Doc
Make a living doc. Include:
- Allowed event names (with descriptions)
- Parameters required/optional
- Example payloads
- Platform consistency checks
Pin it to your Slack. Lock it in your onboarding.
Final Words: Name Like a Pro, Track Like a Boss
If your event naming is a mess, your whole analytics layer is rotten.
So set rules. Enforce consistency. Track intentionally.