Sub topic 1
Events and properties: what the reports are built from
Every funnel, cohort, and retention report in Amplitude and Mixpanel is a query over one table of events. If you understand what a row in that table contains, you can predict what a report will show and find out why it sometimes shows something odd. This chapter covers the event model, the three kinds of properties, how the SDK calls in the Topic Spine create rows, and the data-quality problems that distort reports later.
Prerequisites
This chapter assumes you have:
- A basic idea of product analytics: an event is something a user did, and a user is a person or device you track.
- Access to an Amplitude or Mixpanel project that has some event data.
- Comfort reading JavaScript snippets. Basic SQL helps for the worked example, but you can skip it.
Identity, meaning how events get tied to one person, gets its own chapter. Here we only note where it fits.
The event as the unit of data
An event is one recorded action at one moment. Both tools store it as a row with these parts:
| Part | Meaning | Example |
|---|---|---|
| Event name | What happened | `Sign Up Started` |
| Timestamp | When it happened | `2026-11-27 22:42:27 UTC` |
| User identifier | Who did it | `user_123` |
| Event properties | Details about this one occurrence | `plan = pro`, `source = pricing_page` |
| User properties | Attributes of the person, as known at that time | `country = DE` |
Reports never look at a "user journey" object. They filter this table by event name, group rows by user, and compare timestamps. A funnel asks which users have row A and then row B in a time range. A retention report asks which users have a row in week 0 and again in week 3. A cohort is a saved rule that selects a set of users from the same table.
The SQL example in the Topic Spine makes this concrete. It assumes a table named events with user_id, event_name, and event_time. A funnel report is a more convenient interface over a query of that shape.
Sending events with the SDKs
The two snippets below send the same two events. The first uses Amplitude.
import * as amplitude from '@amplitude/analytics-browser';
amplitude.init('YOUR_AMPLITUDE_API_KEY');
amplitude.setUserId('user_123');
amplitude.track('Sign Up Started', { plan: 'pro', source: 'pricing_page' });
amplitude.track('Sign Up Completed', { plan: 'pro', source: 'pricing_page' });The second uses Mixpanel.
import mixpanel from 'mixpanel-browser';
mixpanel.init('YOUR_PROJECT_TOKEN');
mixpanel.identify('user_123');
mixpanel.track('Sign Up Started', { plan: 'pro', source: 'pricing_page' });
mixpanel.track('Sign Up Completed', { plan: 'pro', source: 'pricing_page' });Each track call adds one row. The first argument is the event name. The second is an object of event properties. Both calls carry the same plan and source values, so a funnel from Sign Up Started to Sign Up Completed can later be broken down by either property.
The call before the events, setUserId in Amplitude and identify in Mixpanel, sets who the rows belong to. Without it, rows are attached to an anonymous device identifier. A funnel counts distinct users, so inconsistent identity makes a person look like two people.
Event properties
An event property describes one occurrence. Its value can differ each time the same event fires. plan on Sign Up Completed is an event property: one user could complete a sign-up on free today and pro next month.
Event properties are what you filter and break down by inside a report. Both tools let you add a filter such as source = pricing_page to a funnel step. Both let you group by a property to see one conversion rate per value.
Choose properties that you will want to slice by later. Good candidates are plan, source, platform, experiment variant, and page or screen. Poor candidates are values that are unique per event, such as a timestamp stored as a string, or a free-text field. These produce thousands of groups and are useless for comparison.
User properties
A user property describes the person and is expected to persist across events, for example country, account_type, or signup_date. The two tools treat these differently in one important way.
- Amplitude stores the user property values in effect when each event was sent, and attaches them to that event. A report grouped by a user property normally shows the value at the time of the event. Amplitude also allows grouping by the most recent value in some reports, so check which one your chart uses.
- Mixpanel keeps a user profile that holds the current value of each profile property. It also allows you to attach the same attribute to events as an event property. Grouping by a profile property uses the profile's current value, while grouping by an event property uses the value recorded at that event.
The practical consequence is that a user who upgraded from free to pro last week may appear under free in one chart and pro in another. If you want a value frozen at the time of an action, send it as an event property.
Property types and why they matter
Properties have types, such as string, number, boolean, and date. The type affects what operators you can use. You can ask for price > 20 only if price is numeric.
Two errors appear often:
- A number sent as a string, such as
"20", cannot be compared numerically in some filters and may sort in text order, where"100"comes before"20". - A boolean sent sometimes as
trueand sometimes as"true"produces two separate values in a breakdown.
Pick one type per property and keep it in every SDK and server call.
Naming and consistency
Event and property names are matched as exact strings. Both tools treat Sign Up Started and Sign up started as different events. A funnel built on one will miss rows recorded under the other.
A short naming convention prevents most problems:
- Use one style for event names, such as
Object Actionin title case (Sign Up Completed). - Use one style for property names, such as lowercase with underscores (
signup_source). - Keep a shared tracking plan document that lists each event, its properties, their types, and the allowed values.
- Change a name only through a deliberate migration, because old rows keep the old name.
Both tools offer features to manage this. Amplitude has a Data tool with event and property definitions and the option to block unplanned events. Mixpanel has Lexicon, where you can describe, hide, or merge events and properties. These help for reading, but they do not rewrite history in every case, so check how a rename or merge applies to past data before relying on it.
What the tracking decides before any report exists
A report can only use what was recorded. This means a few design choices at tracking time limit every later analysis.
- If you did not send
sourceonSign Up Started, you cannot break the funnel down by source for past data. - If one event covers two meanings, such as a single
Clicked Buttonevent with abutton_nameproperty, every funnel step needs a filter on that property. This works but is easier to get wrong than distinct events. - If a step happens on the server, such as payment confirmation, and the user identifier is missing on that call, the funnel loses those users at that step even though they did convert.
Worked example: checking the raw data before building a funnel
Before you trust a funnel, confirm that the events behind it look right. Use this short checklist on Sign Up Started and Sign Up Completed.
- Open the event list in the tool and confirm both names appear exactly once, with the capitalization you expect.
- Open a single event and look at its properties. Confirm
planandsourceare present and have sensible values. - Segment each event by
source. If the values includepricing_page,Pricing_Page, andpricing page, you have three spellings of one source, and a breakdown will split them. - Compare daily counts for the two events. Completed should not exceed Started by a large margin. If it does, some completions are probably firing without a start, or a start is not being tracked on some platforms.
- Look at the user counts, not only the event counts. A single user who triggers an event five times adds five to the event count and one to the user count. Funnels use user counts by default.
Only after these checks does a conversion rate mean what you think it means.
A funnel can show a healthy conversion rate built on bad data. If Sign Up Started is missing on mobile but Sign Up Completed is tracked everywhere, the mobile users who convert are dropped from step one, and the rate for the remaining users looks different from reality. Always compare event counts by platform before you read the funnel.Common errors
| Symptom | Likely cause |
|---|---|
| A step shows far fewer users than expected | Event name differs by capitalization or spelling on some platforms |
| A breakdown has many near-duplicate values | Property values are not normalized, such as `Pro` and `pro` |
| A numeric filter returns nothing | The property was sent as a string |
| One person is counted twice | Identity was set after the first events, or on only some calls |
| A property is empty in older data | It was added to the tracking after those events were recorded |
Summary of the model
- A report is a query over rows with an event name, a timestamp, a user, and properties.
- Event properties describe one occurrence and are the main way to filter and break down.
- User properties describe the person, and the two tools differ in whether a report uses the value at event time or the current value.
- Names and types must be consistent, because the tools match them exactly.
- Choices made when tracking limit every later report.
Exercise
A funnel from Sign Up Started to Sign Up Completed is broken down by source. The breakdown shows pricing_page, Pricing_Page, and (none) as three groups, and each group has a different conversion rate. Name two causes you would check in the raw events, and say which fix applies to historical data.
Show answer
First, the same source is sent with inconsistent capitalization, so the tool treats pricing_page and Pricing_Page as different values. Second, source is missing on some events, for example on a platform or code path that never sets it, which produces the (none) group. Fix the tracking code to send one normalized value, and confirm every call site includes the property. This fixes new data only. Rows already recorded keep their old values, so for history you either combine the values by hand in the report, or use a tool feature that groups or renames values if one is available, after checking how it treats past data.
Exercise
A user upgraded from free to pro last week. A teammate groups a report by the plan event property on Sign Up Completed, and another groups by a current-value profile property named plan. Why can the same user appear in different groups, and which approach would you use to analyze conversion by the plan chosen at sign-up?
Show answer
The event property keeps the value sent with that event, so the user stays in the group for the plan they had at sign-up. The profile property holds the current value, so the user appears as pro even though they signed up on free. To analyze conversion by the plan chosen at sign-up, group by the event property, because it is fixed at the time of the action.