Properties
You can set user properties and device metadata via a simple API.
User Identification
Identifying users is key to tracking their behavior across multiple sessions and applications.
User ID: This should be a unique, persistent identifier for each user.
// The SDK generates a unique c3d.deviceid (Device Identifier) automatically on session start.
// This property is used for cross-session analysis, however please note that fingerprinting device
// identifiers are not always reliable for cross-session tracking.
c3d.userId = 'a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6';
Participant Full Name: This is a friendly, human-readable name to label the user's session on the dashboard.
c3d.setParticipantFullName("John Smith");
Participant ID: Sets a cross-session identifier for a research participant.
c3d.setParticipantId('p-alpha-42');
Custom Participant Properties: These properties are automatically prepended with c3d.participant. and are specifically for research or cohort tracking.
// Set an individual participant property: c3d.participant.cohort = 'GroupA'
c3d.setParticipantProperty('cohort', 'GroupA');
// Set multiple participant properties at once
c3d.setParticipantProperties({
'experimental_group': 'Trained',
'pre_test_score': 85
});
Session Properties
You can also set properties that are specific to a single session.
Note: Session properties, once set, are bundled with the outgoing gaze stream. They are only resent if their value changes. If the same property is set multiple times, only the most recent value is reflected on the Cognitive3D dashboard for that session.
Session Name: A descriptive name for the session, which can be useful for A/B testing or identifying specific playthroughs.
c3d.setSessionName("Onboarding Tutorial - Version B");
Lobby ID: If your application has multiplayer or shared social spaces, you can use this to group all users who were in the same lobby.
c3d.setLobbyId("Lobby-Alpha-42");
Custom User Properties
You can attach any custom key-value data to a user. This is perfect for tracking demographics, user progression, or experimental groups.
// The key is a string, and the value can be a string, number, or boolean.
c3d.setUserProperty('Age', 34);
c3d.setUserProperty('PlayerClass', 'Mage');
c3d.setUserProperty('HasCompletedTutorial', true);
Device Properties
The SDK automatically captures some device information, but you can also set properties manually to provide more specific details.
// A friendly name for the device being used
c3d.setDeviceName('My Custom VR Rig');
// Set a specific, known property
c3d.setDeviceProperty('AppName', 'VR-Training-Sim');
c3d.setDeviceProperty('AppVersion', '2.1.0');
Standard properties
The SDK attempts to retrieve/ infer the following properties automatically:
- AppEngine (Three.js, Wonderland, etc...)
- AppEngineVersion
- AvailableDeviceCPUCores
- AvailableDeviceMemory
- Boundary Type (Stationary/ Room Scale)
- DeviceType
- DeviceID (Unique Device Identifier from FingerprintJS)
- DeviceID Confidence (Confidence Score for the Device Identifier)
- DeviceOS
- DevicePlatform
- DeviceCPUVendor
- DeviceGPU
- DeviceGPUVendor
- DeviceScreenHeight
- DeviceScreenWidth
- Room Size (area in square meters)
- Room Dimensions (length x width in meters)
- VRModel (Inferred based on controller information)
- VRVendor (Inferred based on controller information)
- EyeTracking (If enabled in WebXR session features)
- HandTracking (If enabled in WebXR session features)
If you have a question or any feedback about our documentation please use the Intercom button (purple circle) in the lower right corner of any web page or join our Discord.