Events
An event is the core unit of data in Leanbase. It represents any interaction a user has with your app or website — such as button clicks, page views, searches, or signups.
Each event includes:
Event name – for example,
$pagevieworquery completed.
Events beginning with$are Leanbase defaults.distinct_id – a unique user identifier, often a
uuidv7value such as018daf23-89b3-7cf8-a4f1-94064c96df90.Timestamp – the exact time the event occurred, in ISO 8601 format (for example,
2024-05-22T17:09:29.220Z).Properties – additional event data, such as
coloror$current_url.
Properties starting with$are Leanbase defaults.
You can capture custom events using any Leanbase SDK or the API.
Leanbase’s client-side SDKs — such as JavaScript Web or React Native — can also automatically capture key user interactions.
You can view live event streams in the Activity tab, which refreshes every 30 seconds for real-time visibility into what’s happening inside your app.
How Events Power Leanbase
Leanbase is an event-based analytics platform, meaning most of its features and insights are driven by events.
While much of this is handled seamlessly by our SDKs, events remain the foundation. For example:
Updating person properties using
$setand$unset.Identifying anonymous users with
$identify.Linking multiple user profiles using
$create_alias.Managing groups via
$groupidentifyand$groupproperties.Calculating bounce rate through
$pageleaveevents.Measuring exposure and experiment significance with
$feature_flag_calledand$feature/experiment-feature-flag-key.Sending data to webhooks triggered by specific events.
Anonymous vs. Identified Events
Leanbase captures two types of events: anonymous and identified.
Identified events can be attributed to a specific user profile, while anonymous events cannot.
For details, see our guide on Anonymous vs. Identified Events.
Event Properties
Just like persons and sessions, events have properties. These are used for filtering, cohort creation, breakdowns, and feature targeting.
When Leanbase ingests events, it automatically detects property types, including:
String (default)
Boolean
Date/Timestamp
Number
Array
Object
If a property type is detected incorrectly, you can manually edit it in Data Management → Properties.
From there, you can also add tags or mark a property as verified for better data hygiene.
Default Properties
Below are some of the default properties captured by Leanbase in client-side applications.
For the full list, visit the Leanbase SDK documentation.
Name | Key | Example Value |
|---|---|---|
Timestamp |
| 2024-05-29T17:32:07.202Z |
OS |
| Mac OS X |
OS Version |
| 10.15.7 |
Browser |
| Chrome |
Browser Version |
| 125 |
Device Type |
| Desktop |
Current URL |
| |
Host |
| |
Path Name |
| /page |
Screen Height |
| 1080 |
Screen Width |
| 1920 |
Viewport Height |
| 950 |
Viewport Width |
| 1903 |
Library |
| web |
Library Version |
| 1.31.0 |
Search Engine |
| |
Referrer URL |
| |
Referring Domain |
| |
Active Feature Flags |
| ['beta_feature'] |
Event Type |
| click |
UTM Source |
| newsletter |
UTM Medium |
| |
UTM Campaign |
| product_launch |
UTM Term |
| new+product |
UTM Content |
| logolink |
Google Click ID |
| TeSter-123 |
Google Ads Source |
| google_ads |
Google Search Ads 360 Click |
| dsa |
Google DoubleClick Click ID |
| testDclid123 |
Google Web-to-app Measure |
| testWbraid123 |
Google App-to-web Measure |
| testGbraid123 |
Facebook Click ID |
| testFbclid123 |
Microsoft Click ID |
| testMsclkid123 |
Twitter Click ID |
| testTwclid123 |
LinkedIn Ad Tracking ID |
| testLiFatId123 |
Mailchimp Campaign ID |
| testMcCid123 |
Instagram Share ID |
| testIgshid123 |
TikTok Click ID |
| testTtclid123 |
Plugins Succeeded |
| ['GeoIP (56578)'] |
Plugins Failed |
| ['plugin3'] |
Plugins Deferred |
| ['plugin4'] |
IP Address |
| 192.168.1.1 |
Managing Event Definitions
In the Events Management page, you can add tags and descriptions to your events.
These appear when searching for events throughout Leanbase, providing clearer context and better discoverability.
You can also set the status of each event to one of the following:
Visible (default): The standard visibility for active events.
Verified: Marks an event with a checkmark to confirm it’s trusted and validated.
Hidden: Hides an event from search results without deleting it — useful for deprecating old events while keeping historical data intact.