Contents
MyDataHelps.getDeviceInfo()
Resolves to a result
object containing device info fields.
Unique identifier for device. On web browsers, this is kept in a cookie which can sometimes be reset.
Describes how the participant is accessing the application. Possible values include: Web
(using the MyDataHelps web application on any device), iOS
(iOS native app), and Android
(Android native app).
Platform-specific fields providing additional information about the device.
MyDataHelps.getDeviceInfo()
.then( function(result) {
console.log(result);
} );
MyDataHelps.getDeviceInfo()
.then( function(result) {
console.log(result);
} );
{
"identifier": "4ef563af-647b-451d-92c2-8acb41e2b2f5",
"platform": "Web",
"properties": {
"Browser": "Chrome",
"BrowserVersion": "89.0.4389.114",
"OperatingSystem": "Windows",
"Resolution": "1920 x 1080"
}
}
{
"identifier": "4ef563af-647b-451d-92c2-8acb41e2b2f5",
"platform": "Web",
"properties": {
"Browser": "Chrome",
"BrowserVersion": "89.0.4389.114",
"OperatingSystem": "Windows",
"Resolution": "1920 x 1080"
}
}
{
"identifier": "D4CDB2C5-13A6-4911-810F-688EF90DDCAA",
"platform": "iOS",
"properties":
{
"TextingCapability": "Available",
"NotificationAlertSetting": "Enabled",
"AppVersion": "2021.7",
"NotificationBadgeSetting": "Enabled",
"NotificationAuthorizationStatus": "Authorized",
"NativeResolution": "828 x 1792",
"LocationAccuracyAuthorizationStatus": "Full",
"LocationAuthorizationStatus": "AuthorizedAlways",
"AppName": "MyDataHelps",
"iOSVersion": "14.4.2",
"HardwareModel": "iPhone11,8",
"DeviceType": "mobile",
"MovementDisorderStatus": "Unknown",
"NotificationSoundSetting": "Enabled",
"Resolution": "414 x 896"
}
}
{
"identifier": "D4CDB2C5-13A6-4911-810F-688EF90DDCAA",
"platform": "iOS",
"properties":
{
"TextingCapability": "Available",
"NotificationAlertSetting": "Enabled",
"AppVersion": "2021.7",
"NotificationBadgeSetting": "Enabled",
"NotificationAuthorizationStatus": "Authorized",
"NativeResolution": "828 x 1792",
"LocationAccuracyAuthorizationStatus": "Full",
"LocationAuthorizationStatus": "AuthorizedAlways",
"AppName": "MyDataHelps",
"iOSVersion": "14.4.2",
"HardwareModel": "iPhone11,8",
"DeviceType": "mobile",
"MovementDisorderStatus": "Unknown",
"NotificationSoundSetting": "Enabled",
"Resolution": "414 x 896"
}
}
{
"identifier": "5dc2a1f1-fb2e-4449-837b-6babd2722282",
"platform": "Android",
"properties":
{
"AppName": "MyDataHelps",
"NativeResolution": "900 x 1600",
"Resolution": "450 x 776",
"HardwareModel": "SM-G955N",
"AppVersion": "2021.14",
"DeviceType": "mobile",
"AndroidVersion": "7.1.2"
}
}
{
"identifier": "5dc2a1f1-fb2e-4449-837b-6babd2722282",
"platform": "Android",
"properties":
{
"AppName": "MyDataHelps",
"NativeResolution": "900 x 1600",
"Resolution": "450 x 776",
"HardwareModel": "SM-G955N",
"AppVersion": "2021.14",
"DeviceType": "mobile",
"AndroidVersion": "7.1.2"
}
}
MyDataHelps.getCurrentLanguage()
The language code configured on the current device, to be used when determining what language to show content in. In the native apps, this will be the language the device itself is configured for. On web, the user is given an option to choose the language they view MyDataHelps in. Formatting is device-dependent. For example, Chrome on Windows 10 may return ‘en’, the iOS native app ‘en-us’, and the Android native app ‘en-US’.
MyDataHelps.trackCustomEvent(event)
You can use custom events to track user actions, such as clicking a link or searching for a topic. Whenever you record a custom event, you give it a type (a name you use to distinguish one kind of event from another) and a key/value set containing whatever details you wish to record about the event. In addition to the data you log, custom events will automatically include:
ParticipantID
ParticipantIdentifier
Timestamp
Custom events can be accessed via the Custom Events Export.
Event details.
Identifies what kind of event occurred.
Key-value pairs with custom event properties.
A promise which resolves if the operation succeeded.
MyDataHelps.trackCustomEvent({
eventType: "ViewedHelp",
properties: {
"helpTopic": "Topic A"
}
})
MyDataHelps.trackCustomEvent({
eventType: "ViewedHelp",
properties: {
"helpTopic": "Topic A"
}
})
MyDataHelps.setStatusBarStyle(style)
See the iOS status bar style documentation.
Allowed values are darkContent
, lightContent
, and default
. If you want the status bar to appear in white, pass lightContent
to this action.
setParticipantAccessToken(token)
Saves the participant’s access token and begins a session.