0
0
Firebasecloud~15 mins

User properties in Firebase - Deep Dive

Choose your learning style9 modes available
Overview - User properties
What is it?
User properties are labels or attributes you assign to users in Firebase Analytics to describe them. These properties help you understand who your users are by grouping them based on characteristics like age, location, or preferences. They are simple key-value pairs that you set in your app or website to track user traits over time.
Why it matters
Without user properties, you would only see general data about all users mixed together, making it hard to understand different user groups. User properties let you see how different types of users behave, so you can improve your app or marketing for each group. This leads to better decisions and happier users.
Where it fits
Before learning user properties, you should understand basic Firebase Analytics concepts like events and user sessions. After mastering user properties, you can explore advanced topics like audience segmentation, custom reporting, and personalized messaging based on these properties.
Mental Model
Core Idea
User properties are simple tags that describe who your users are, letting you group and analyze them better.
Think of it like...
Think of user properties like name tags at a party that say things like 'Loves sports' or 'From New York.' These tags help the host understand and talk to groups of guests with similar interests.
┌─────────────────────┐
│      User Base      │
├─────────┬───────────┤
│ User 1  │ Properties│
│         │ - Age: 25 │
│         │ - City: NY│
├─────────┼───────────┤
│ User 2  │ Properties│
│         │ - Age: 30 │
│         │ - City: LA│
├─────────┼───────────┤
│ User 3  │ Properties│
│         │ - Age: 25 │
│         │ - City: NY│
└─────────┴───────────┘

Groups form by matching properties like Age or City.
Build-Up - 6 Steps
1
FoundationWhat are user properties?
🤔
Concept: User properties are attributes that describe users in Firebase Analytics.
User properties are simple labels you assign to users to describe them. For example, you might set a property called 'favorite_color' with the value 'blue' for a user. These properties help you understand your users better by grouping them based on shared traits.
Result
You can see groups of users who share the same properties, like all users who like blue.
Understanding that user properties are just labels helps you see how they organize user data for better analysis.
2
FoundationHow to set user properties
🤔
Concept: User properties are set in your app code or website using Firebase SDK methods.
In your app, you use Firebase functions to assign user properties. For example, in JavaScript: firebase.analytics().setUserProperties({favorite_food: 'pizza'}). This tells Firebase to remember that property for the current user.
Result
Firebase stores the property and associates it with the user for future analysis.
Knowing how to set properties in code is essential to start collecting meaningful user data.
3
IntermediateLimits and naming rules for properties
🤔Before reading on: do you think you can create unlimited user properties with any names? Commit to your answer.
Concept: Firebase limits the number of user properties and enforces naming rules to keep data clean and efficient.
Firebase allows up to 25 user properties per project. Property names must be 1-24 characters, start with a letter, and contain only letters, numbers, or underscores. Reserved names like 'firebase_' are not allowed. These rules help keep data organized and prevent conflicts.
Result
You must plan which properties to use carefully and follow naming rules to avoid errors.
Understanding limits and rules prevents common mistakes that cause data loss or confusion.
4
IntermediateHow user properties affect analytics reports
🤔Before reading on: do you think user properties instantly appear in all Firebase reports? Commit to your answer.
Concept: User properties influence how Firebase Analytics segments users and appear in reports after some delay.
User properties are used to create audiences and filter reports. However, it can take up to 24 hours for new properties to appear in Firebase Analytics reports. Also, properties only affect data from the time they are set onward, not retroactively.
Result
You see segmented reports based on user properties, but with some delay and only for new data.
Knowing the delay and data scope helps set realistic expectations for analysis timing.
5
AdvancedUsing user properties for audience targeting
🤔Before reading on: do you think user properties can be used to send personalized messages? Commit to your answer.
Concept: User properties enable creating audiences for targeted messaging and personalized experiences.
Firebase lets you build audiences by filtering users with specific properties, like 'premium_user = true.' These audiences can be used with Firebase Cloud Messaging or Remote Config to send personalized notifications or change app behavior for those users.
Result
You can deliver tailored content or offers to specific user groups based on their properties.
Understanding this unlocks powerful ways to engage users and improve retention.
6
ExpertBest practices and pitfalls with user properties
🤔Before reading on: do you think setting too many user properties is harmless? Commit to your answer.
Concept: Experts carefully choose user properties to avoid exceeding limits and ensure meaningful data.
Setting too many properties or changing them too often can cause data noise and hit Firebase limits. Also, avoid storing sensitive personal data as properties. Instead, use properties that help segment users meaningfully and keep names consistent. Regularly review and clean unused properties.
Result
Your analytics remain clean, efficient, and compliant with privacy rules.
Knowing these best practices prevents wasted effort and protects user privacy.
Under the Hood
Firebase Analytics collects user properties from your app and stores them linked to a unique user ID. These properties are sent with event data to Firebase servers, where they are processed and aggregated. The system indexes properties to enable fast filtering and segmentation in reports and audience definitions. Properties persist across sessions until changed or cleared.
Why designed this way?
User properties were designed as lightweight, flexible labels to avoid complex user profiles that slow down analytics. Limiting the number and enforcing naming rules keeps the system scalable and performant. This design balances rich user insights with efficient data processing and privacy considerations.
┌───────────────┐       ┌───────────────┐       ┌───────────────┐
│   User App    │──────▶│ Firebase SDK  │──────▶│ Firebase Cloud│
│ (sets props)  │       │ (collects props)│      │ Analytics DB  │
└───────────────┘       └───────────────┘       └───────────────┘
         │                      │                      │
         ▼                      ▼                      ▼
  User Properties       Sent with events        Indexed & stored
  stored locally        for processing         for reports &
  until sent                                   audience building
Myth Busters - 4 Common Misconceptions
Quick: do you think user properties can be changed retroactively in past data? Commit to yes or no.
Common Belief:User properties update all past data immediately when changed.
Tap to reveal reality
Reality:User properties only apply to data collected after they are set; past data remains unchanged.
Why it matters:Expecting retroactive changes leads to confusion when old reports don't reflect new property values.
Quick: do you think you can create unlimited user properties? Commit to yes or no.
Common Belief:There is no limit to how many user properties you can create.
Tap to reveal reality
Reality:Firebase limits you to 25 user properties per project to maintain performance.
Why it matters:Ignoring limits can cause properties to be dropped silently, losing important data.
Quick: do you think user properties can store sensitive personal info safely? Commit to yes or no.
Common Belief:It's safe to store personal sensitive data like passwords or credit cards in user properties.
Tap to reveal reality
Reality:User properties should never contain sensitive personal information due to privacy and security risks.
Why it matters:Storing sensitive data risks user privacy violations and can lead to legal issues.
Quick: do you think user properties instantly appear in Firebase reports? Commit to yes or no.
Common Belief:User properties show up immediately in all Firebase Analytics reports after setting.
Tap to reveal reality
Reality:There is a delay, often up to 24 hours, before user properties appear in reports.
Why it matters:Expecting instant results can cause frustration and misinterpretation of data freshness.
Expert Zone
1
User properties are immutable per event but can be updated between sessions, affecting how user history is segmented.
2
Firebase aggregates user properties at the user level, so properties set on one device sync across devices for the same user ID.
3
Custom user properties do not affect Firebase's predefined user properties, which track basic info like device and app version.
When NOT to use
User properties are not suitable for tracking frequent or event-specific data; use custom events with parameters instead. For detailed user profiles or sensitive data, use secure backend databases rather than user properties.
Production Patterns
In production, teams define a fixed set of user properties aligned with business goals, use them to create audiences for targeted campaigns, and monitor property usage to avoid hitting limits or privacy issues.
Connections
Audience segmentation
User properties build the foundation for creating targeted user groups in audience segmentation.
Understanding user properties helps you grasp how audiences form and how to tailor experiences for different user groups.
Event tracking
User properties complement event tracking by adding user context to event data.
Knowing user properties alongside events gives a fuller picture of user behavior and preferences.
Database tagging systems
User properties are similar to tagging records in databases to categorize and filter data.
Recognizing this connection helps understand how metadata organizes information across fields.
Common Pitfalls
#1Setting too many user properties without planning.
Wrong approach:firebase.analytics().setUserProperties({prop1: 'a', prop2: 'b', prop3: 'c', ..., prop30: 'z'});
Correct approach:firebase.analytics().setUserProperties({favorite_color: 'blue', premium_user: 'true'});
Root cause:Misunderstanding Firebase's 25-property limit leads to silent dropping of excess properties.
#2Using invalid property names with spaces or special characters.
Wrong approach:firebase.analytics().setUserProperties({'favorite color': 'blue'});
Correct approach:firebase.analytics().setUserProperties({favorite_color: 'blue'});
Root cause:Not following naming rules causes properties to be ignored or errors.
#3Expecting user properties to update past analytics data.
Wrong approach:Changing a user property and expecting all old reports to reflect the change immediately.
Correct approach:Understanding user properties only affect data collected after they are set.
Root cause:Misconception about how analytics data is stored and processed over time.
Key Takeaways
User properties are simple labels that describe users and help group them for better analysis.
They must follow naming rules and are limited to 25 per project to keep data clean and efficient.
User properties only affect data collected after they are set and appear in reports after a delay.
They enable powerful audience targeting for personalized messaging and app experiences.
Careful planning and privacy awareness are essential to use user properties effectively and responsibly.