How to fix Analytics: Code 9 - More than 25 unique user properties in Firebase

FirebaseINTERMEDIATEMEDIUMUpdated Dec 22, 2025ยท 116 views

Firebase Analytics limits projects to 25 unique user properties. When you attempt to set a 26th property, Analytics returns Code 9 and silently drops the new property without logging it.

Quick fix

Fixes Analytics: Code 9 - More than 25 unique user properties

# In your codebase, search for all setUserProperty calls
grep -r "setUserProperty" .
# Or for different SDK patterns:
grep -r "setUserProperties" .
  1. Audit your current user properties
  2. Identify and remove unused properties
  3. Consolidate related properties
  4. Use event parameters for additional data
firebase โ€” error
# In your codebase, search for all setUserProperty calls
grep -r "setUserProperty" .
# Or for different SDK patterns:
grep -r "setUserProperties" .
Analytics: Code 9 - More than 25 unique user properties

What this error means

This error occurs when your Firebase Analytics implementation tries to register more than 25 distinct user properties within a single project. Firebase Analytics enforces this limit as a quota restriction to maintain performance and data consistency across all Firebase projects. User properties in Firebase Analytics are attributes you define to describe segments of your user base, such as language preference, subscription tier, or user type. While these properties are powerful for audience segmentation and analysis, Firebase restricts each project to a maximum of 25 unique property names. When you exceed this limit, Firebase Analytics logs error code 9 and refuses to process the 26th property or any additional properties beyond the limit. The error appears in your console logs but doesn't throw an exception, so it can go unnoticed until you review your analytics data and discover missing properties.

Typical symptoms

  • Analytics code 9 appears in browser console or application logs
  • User properties set after the 25th property do not appear in Firebase Analytics dashboard
  • setUserProperty() calls complete without errors but data is missing
  • Analytics reports show incomplete user segmentation data
  • Debug view in Firebase shows the error when attempting to set properties

Common causes

  1. Setting more than 25 unique user property names across your application
  2. Accidentally creating duplicate properties with different casing (property names are case-sensitive)
  3. Legacy properties from old implementations that were never removed
  4. Multiple teams or modules independently adding user properties without coordination
  5. Dynamically generating property names that exceed the limit

How to fix "Analytics: Code 9 - More than 25 unique user properties"

1Audit your current user properties

First, identify all user properties currently in use. Open Firebase Console and navigate to Analytics > User properties to see your registered properties.

bash
# In your codebase, search for all setUserProperty calls
grep -r "setUserProperty" .
# Or for different SDK patterns:
grep -r "setUserProperties" .

Count how many unique property names you're using. Remember that property names are case-sensitive, so "UserType" and "usertype" count as two separate properties.

2Identify and remove unused properties

Review your list and remove any properties that are:
- No longer used in your analytics reports
- Duplicate properties with slightly different names
- Test properties from development that made it to production

Remove the setUserProperty calls from your code:

javascript
// Remove unused properties
// firebase.analytics().setUserProperty('old_property', value); // DELETE THIS

Note: Removing code only prevents future logging. Historical data remains in Firebase.

3Consolidate related properties

Combine similar properties into single, more comprehensive values. For example:

javascript
// Before: 3 separate properties
firebase.analytics().setUserProperty('is_premium', 'true');
firebase.analytics().setUserProperty('is_trial', 'false');
firebase.analytics().setUserProperty('is_free', 'false');

// After: 1 consolidated property
firebase.analytics().setUserProperty('subscription_tier', 'premium');

This approach reduces your property count while maintaining the same analytical value.

4Use event parameters for additional data

If you still need to track more than 25 user attributes, move some data to event parameters instead:

javascript
// Instead of user property for frequently changing data
firebase.analytics().logEvent('page_view', {
  current_section: 'checkout',
  user_journey_step: 'payment',
  session_duration: 245
});

Event parameters have different limits (25 per event, up to 500 distinct parameter names) and are better suited for action-specific data rather than persistent user attributes.

5Verify the fix

Test your changes using Firebase DebugView:

1. Enable debug mode in your app:

javascript
// Web
firebase.analytics().setAnalyticsCollectionEnabled(true);

// Android
adb shell setprop debug.firebase.analytics.app <package_name>

// iOS
-FIRDebugEnabled in Xcode scheme arguments

2. Navigate to Firebase Console > Analytics > DebugView
3. Trigger user property setting in your app
4. Verify no Code 9 errors appear and all properties are logged successfully

Advanced notes

Google Analytics 360 Upgrade: If you have a legitimate business need for more than 25 user properties, you can upgrade to Google Analytics 360, which offers higher limits. However, this is an enterprise solution with significant costs and should only be considered if consolidating properties is not viable.

Case Sensitivity Gotcha: User property names are case-sensitive. "UserType", "userType", and "usertype" count as three distinct properties. Always use a consistent naming convention (e.g., snake_case: "user_type") and document it for your team.

Character Limits: Beyond the 25-property limit, individual properties also have constraints:
- Property names: 24 characters maximum
- Property values: 36 characters maximum (though documentation mentions 100 characters for string values)

Cross-Platform Considerations: The 25-property limit applies per Firebase project, not per platform. If you're tracking the same users across web, iOS, and Android apps, ensure your properties are consistent and don't accidentally create duplicates like "platform_web" and "platform_mobile".

Alternative: Custom Dimensions in BigQuery: If you've linked Firebase Analytics to BigQuery, you can create custom dimensions and metrics in BigQuery without the 25-property limitation. This requires SQL knowledge but offers much greater flexibility for complex analytics.

Frequently asked questions

What does "Analytics: Code 9 - More than 25 unique user properties" mean?
This error occurs when your Firebase Analytics implementation tries to register more than 25 distinct user properties within a single project. Firebase Analytics enforces this limit as a quota restriction to maintain performance and data consistency across all Firebase projects. User properties in Firebase Analytics are attributes you define to describe segments of your user base, such as language preference, subscription tier, or user type.
How do I fix "Analytics: Code 9 - More than 25 unique user properties"?
Firebase Analytics limits projects to 25 unique user properties. When you attempt to set a 26th property, Analytics returns Code 9 and silently drops the new property without logging it.
What causes "Analytics: Code 9 - More than 25 unique user properties"?
Setting more than 25 unique user property names across your application Accidentally creating duplicate properties with different casing (property names are case-sensitive) Legacy properties from old implementations that were never removed
Is the "Analytics: Code 9 - More than 25 unique user properties" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading