User Online Detector - 0 WU
Last updated
Last updated
Plugin page: https://bubble.io/plugin/user-online-detector---0-wu-1717331641063x165919281217011700
Introducing the Online User Statistics - the first plugin that allows you to track online users in Bubble without consuming any workload units! Creating a social network and want to display online users? It's no longer a hassle!
Now, at any given moment, you can accurately know how many users are online in your application, which pages they're on, and who these users are. Keep track effortlessly and make informed decisions about your app's engagement in real-time!
No Workload Unit Consumption: The solution does not use workload units to perform user monitoring.
Real-Time Monitoring: See if a user is online in real-time.
User Statistics: Always know who is online in your app and which pages they are on.
Enhanced User Engagement: Gain more opportunities to work with user engagement.
Maximum Accuracy: Enjoy precise monitoring of your users.
Install the plugin: Search for the plugin in the plugin list and install it in your application.
Add "User Monitoring (UM)" element: You need to place this element on all pages, where you need to track ers.
Settings: Set the idle time and specify whether you want to trigger an event when the user is idle (session expiry event checkbox).
Add the element UM: User List: To display users on the page, you need to add the element UM: User List to the page and set the Response Type to the built-in plugin type "User Statistics Type." Please note that this is created using a mock API request, so do not use this for displaying data via "get data from an external API," as it will result in an error.
Set a filter if needed: If you want the element to display only certain users, for example, users from a specific page, you can set a filter. The filter only supports the "=" operator and uses ";" as a parameter separator (logical AND is applied if multiple filter parameters are set). For example, to display only users who are on the page /user-monitoring in the test version of the app and are currently active, you need to set the following filter:
url=/version-test/user-monitoring;active=true
Supported fields: "userId", "userIp", "url", "active", "on_page"
If you want to additionally access user data from the application’s database, you can enable the "Return User List (Bubble Data Type)" checkbox. In this case, an additional state "Users (Bubble DataType)" will become available for the element, containing a list of users from Bubble's database who are currently in the application.
The plugin provides the following output data structure:
onlineUsers: An array containing information about users currently online.
userId: Unique identifier for the user.
userIp: The IP address of the user.
url: The URL the user is currently on.
appVersion: The version of the app the user is using.
metadata: Additional information about the user's session.
userAgent: The user agent string of the user's browser.
active: Whether the user is currently active (true
or false
).
became_inactive: Timestamp of when the user became inactive (if applicable).
on_page: Whether the user is still on the current page (true
or false
).
deviceInfo: Information about the user's device.
userAgent: Same as in the metadata, the browser's user agent string.
language: The primary language setting of the user's browser.
languages: A list of all languages the user's browser is set to support.
browserName: Name of the user's browser (e.g., Chrome, Firefox).
browserVersion: Version of the browser.
deviceType: The type of device the user is using (e.g., Desktop, Mobile).
osType: The user's operating system (e.g., Windows, macOS).
totalUniqueUsers: The total number of unique users currently online.