IOS
!Adding UserX SDK
Initialization
Screen recording settings
Screens registration
Sending user ID
Additional user attributes
Keyboard detection
Trapping exceptions
Sending events
Hiding personal data
Scrolling recording
Get a session link
Change video recording quality
Android
Adding UserX SDK
Initialization
Screen recording settings
Screens registration
Sending user ID
Additional user attributes
Keyboard detection
Trapping exceptions
Sending events
Hiding personal data
Hiding personal data in Jetpaсk Compose
Disabling recording while scrolling (Jetpack Compose)
Recording WebView
GoogleMaps rendering
Yandex MapKit rendering
Scrolling recording
Get a session link
Change video recording quality
Unity IOS
new!Adding UserX Plugin
Initialization
Sending user ID
Screen recording settings
Sending events
Screens registration
Unity Android
new!Adding UserX Plugin
Initialization
Sending user ID
Keyboard detection
Trapping exceptions
Sending events
Screens registration
Screen recording settings
Scrolling recording
Xamarin IOS
new!Adding UserX
Initialization
Sending user ID
Screen recording settings
Sending events
Trapping exceptions
Flutter
new!Flutter UserX plugin
Initialization
Sending user ID
Sending events
Screen registration
Screen recording settings
Enable catch crashes
Get a session link
React Native
Adding UserX SDK
Initialization
Sending user ID
Screens registration
Sending events
Hiding personal data
Get a session link
Third party integrations
Slack
Crashlytics
Google Analytics
AppsFlyer
FAQ
Adding UserX SDK
Integration instructions via Swift Package Manager (for Xcode 12+):
From the Xcode menu select: File -> Swift Packages -> Add Package Dependency ...
In the window that opens, specify the link to the UserXKit repository: https://github.com/UserXMetrica/UserX/ Click Next
In the next step, confirm the current current version of UserXKit by clicking Next
In the final window, confirm adding UserXKit to the selected target by clicking Finish
Cocoapods SDK Installation
Add pod 'UserX' to the corresponding object in your podfile and run pod install.
pod 'UserX', '2.8.0'
We recommended you to update cocoapods version before integration:
pod update
Manual SDK Installation:
Download the latest version of the UserX SDK for iOS project.
Unzip the file and drag UserX.framework
to section "Embedded Binaries" on "General" tab in your XCode project.
Instructions for integration into projects on Objective-C:
Find the flag Always Embed Swift Standard Libraries in "Build settings" of your target and turn it to "YES".
Integration with Carthage
Add the appropriate instruction to Cartfile:
binary "https://raw.githubusercontent.com/UserXMetrica/UserX/master/UserX.json"
In the terminal at the project folder location, run:
carthage update UserX --platform iOS
Then add UserX.framework to your project.
Initialization
UserX has 3 modes. Each of them has its own initialization method.
Use only one initialization method.
By default, only automatic mode is available to you. The rest of the modes are available only on individual plans.
In AppDelegate
your application, add:
import UserXKit
Mode 1 (default): auto
In method application:didFinishLaunchingWithOptions
add a line:
UserX.start("YOUR_API_KEY")
Mode 2: SDK manual mode
In method application:didFinishLaunchingWithOptions
add a line:
UserX.configure(YOUR_API_KEY")
In manual mode, the session and all its events will start recording only after calling the session start method. Recording will end after calling the stop recording method, or after the user minimizes the application.
// both of these methods only work after manual initialization of UserX
UserX.startSession(); // start recording
UserX.stopSession(); // stop recording
Mode 3: manual control of sending a session
In method application:didFinishLaunchingWithOptions
add a line:
UserX.start("YOUR_API_KEY", uploadIfMarked: true)
In this mode, the session will be recorded in the same way as in the automatic one, but it will be sent to the server only if the method was called during the session:
UserX.markSessionToUpload();
UserX automatically stops recording video when the device's free RAM is low. You can disable this feature by calling the method below before calling UserX.start:
UserX.ignoreLowMemory = true // default is false (edited)
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec. Do not kill the app from memory after the first launch.
- Refresh the console page after 30-60 sec., your test session should appear. The interface of the page will be updated.
- Go to the "Session Replay" tab and watch the video of your session.
NOTE: before sending to server, the data is saved to the .cachesDirectory to a separate folder UserXAnalytics. If you clear this directory after the end of the application, then session data may be lost (not sent to the server). In this case, add the UserXAnalytics folder to the exceptions (so the data not be lost).
Screen recording settings
Video recording starts when app launches (by default).
To change this (so that the video is not recorded from the start), immediately after launch the app you need to call:
UserX.stopScreenRecording() // stop video recording
Next, at the moment when you open the screen, where it is needed to record the video, you need to call:
UserX.startScreenRecording() // start video recording
When you open the screen that should not be recorded, you need to call:
UserX.stopScreenRecording() // stop video recording
Screens registration
For correctly working heat maps, UserX SDK should register all screens in the app. In native app, screens registration is performed automatically.
To check it, after integration SDK you should to do next steps:
- open all screens in yor app;
- minimize the app;
- check the screens is correctly displayed in the Heat Maps on UserX Console.
Some screens may not be recognized, in which case they need to be registered manually.
Manual screen register:
In some cases, it is needed manual marking for screens. For this when you open the screen use this code:
UserX.startScreen(named "Screen name")
If you are using WebView on your screens, then such screens are not registered automatically and they will need to be marked up (call the above method when switching between different screens inside webview).
Sending user ID
You can transferred your internal user ID to UserX. This allow you to find sessions of specific users of your app (for example, after a user contacts support, you can watch his video recording, which will show what he did before contacting support).
Use this code:
UserX.userId = "YOUR_INTERNAL_USER_ID"
To get the user ID generated in UserX, call the method:
UserX.userIndex // String?
Additional user attributes
In addition to the User ID,
you can also pass additional user attributes. For example, user ID's from other analytics systems, city registration, etc.
After that, you will be able to search for users by such attributes.
Use this code:
UserX.applyUserAttributes(
.key(<name: String>, value: <value: Bool>),
.key(<name: String>, value: <value: Int64>),
.key(<name: String>, value: <value: Double>),
.key(<name: String>, value: <value: String>),
.counter(<name: String>, value: <value: Int64>),
)
UserX.applyUserAttributes(
. increasedCounter(<name: String>, by: <value: Int64>),
)
UserX.applyUserAttributes(
. decreasedCounter(<name: String>, by: <value: Int64>),
)
Keyboard detection
You can enable or disable keyboard output by using this parameter (disabling reduces system loading):
UserX.isKeyboardRenderingEnabled // default = false
Trapping exceptions
To disable the collection of crash-logs:
UserX.catchExceptions true / false // default = false
Sending events
You can send information to UserX about users performing main events (for example, "Payment completed"). This will allow you to find sessions of users who performed/did not perform these actions and analyze the reasons for their behavior.
To send events, use following methods:
UserX.addEvent("Name")
UserX.addEvent(_ name: String, with parameters: [String: Any]? = nil)
Hiding personal data
Set up personal data hiding
.UIKit To hide any interface element (where content should not be displayed in the video session), use this code:
view.isSensitive = true
SwiftUI To hide interface elements, use the method:
YourSensitiveView()
.uxSensitive()
To hide (true) / unhide fields (false) use this method:
YourSensitiveView()
.uxSensitive(true|false)
For example, you have a list of fields, some of which you don't want to hide. In this case, you can pass it through a variable, and change its value depending on the conditions:
YourSensitiveView()
.uxSensitive(flagToHideView)
Scrolling recording
Video recording during scrolling
By default, UserX does not record video while scrolling items on the screen. You can turn on the record by calling the method below, but this may reduce performance.
UserX.isScrollRenderingEnabled = true // default = false
Get a session link
Every time when launch your app , the UserX SDK generates links:
- for current session;
- for all device sessions.
You can use links in your third parties systems for watching video sessions by link.*
*to view videos by the link, you should be authorized in the UserX Console.
To get link for current session call:
UserX.sessionUrl
To get link for all sessions on this device call:
UserX.externalAnalyticsUrl
Change video recording quality
UserX.videoQuality = .medium // default value
Possible values:
UserX.videoQuality = .high
UserX.videoQuality = .medium
UserX.videoQuality = .low
* If you need to change the recording quality for all screens, then you need to call when launching the app
Adding UserX SDK
Manual SDK installation:
Download the latest version of the UserX SDK for Android project.
Unzip downloaded file.
Open your project in Android Studio.
Add a new module File -> New -> New Module
- select Import .JAR/.AAR Package
, where specify the path to the downloaded userx.aar
.
Check that in settings.gradle
added library: include ..., ':userx'
Add this code in build.gradle
of your project in the section dependencies:
for native app:
implementation project(":UserX-4.2.5")
Import from repository:
Add this code in build.gradle
application level in the repositories
for native app:
maven { url 'https://github.com/userxpro/userx/raw/maven/' }
Add this code in build.gradle
of your project in the section dependencies
for native app:
implementation "pro.userx:UserX:4.2.5@aar"
if you are using Jetpaсk Compose:
implementation project("pro.userx:UserX:4.2.15.compose@aar")
Initialization
UserX has 3 modes. Each of them has its own initialization method.
Use only one initialization method.
By default, only automatic mode is available to you. The rest of the modes are available only on individual plans.
Mode 1 (default): auto
Activation of UserX occurs by calling the following code (It is necessary to call once. You should initialize UserX in the overridden Application class in the onCreate method):
UserX.init(Application app, String apiKey);
Mode 2: SDK manual mode
UserX.manualMode(Application app, String apiKey);
In manual mode, the session and all its events will start recording only after calling the session start method. Recording will end after calling the stop recording method, or after the user minimizes the application.
// both of these methods only work after manual initialization of UserX
UserX.startSession(); // start recording
UserX.stopSession(); // stop recording
Mode 3: manual control of sending a session
UserX.init(Application app, String apiKey, boolean uploadIfMarked); // if uploadIfMarked = true - then the manual control mode for sending the session is turned on
In this mode, the session will be recorded in the same way as in the automatic one, but it will be sent to the server only if the method was called during the session:
UserX.markSessionToUpload();
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec. Do not kill the app from memory after the first launch.
- Refresh the console page after 30-60 sec., your test session should appear. The interface of the page will be updated.
- Go to the "Session Replay" tab and watch the video of your session.
Screen recording settings
Video recording starts when app launches (by default).
To change this (so that the video is not recorded from the start) , immediately after launch the app you need to call:
UserX.stopScreenRecording(); // stop video recording
Next, at the moment when you open the screen, where it is needed to record the video, you need to call:
UserX.startScreenRecording(); // start video recording
When you open the screen that should not be recorded, you need to call:
UserX.stopScreenRecording(); // stop video recording
Screens registration
If you do not need any screens for viewing in UserFlows - you can hide them.
In native app XML screens registration is performed automatically. To check it, after integration SDK you should to do next steps:
- open all screens in yor app;
- minimize the app;
- check the screens is correctly displayed in the Heat Maps on UserX Console.
All screens should be recognized.
If you use proguard - incorrect registration of screen class names is possible, to fix this add the following rules to the proguard-rules of your project:
-keep class * extends android.app.Fragment
-keep class * extends androidx.fragment.app.Fragment
-keep class * extends android.support.v4.app.Fragment
Manual screen register: In some cases, it is needed manual marking for screens. For this when you open the screen use this code:
/**
* @param title - screen title
*/
UserX.addScreenName(String title)
If you are using WebViewon your screens, then such screens are not registered automatically and they will need to be marked up (call the above method when switching between different screens inside webview).
If necessary, you can also disable the automatic registration of fragments and modal view in the app:
UserX.setAutodetectFragments(false); // default - true
UserX.setAutodetectDialogsAndMenus(false); // default - false
Sending user ID
You can transfer your internal user ID to UserX. This is necessary to use filters by User ID, also it is needed to disable tracking by User ID.
UserX.setUserId("YOUR_INTERNAL_USER_ID");
Additional user attributes
You can pass your own user attributes like first name, last name, age.Then you can search for users by attributes. User attribute values are overwritten, but you can find the user by their previous attribute value. There are 2 types of attributes - simple and counter. A simple attribute can be a string, number, or boolean. A simple attribute can be used to search for a complete match. For an attribute of the counter type, it is possible to set a value, decrease or increase. Users can be searched for by a complete match of the counter value or by more / less.
Use the following method to set users attributes:
UserX.applyUserAttributes(Attribute... attributes);
// Simple attribute:
Attribute.stringAttribute(String name).set(String value);
Attribute.numberAttribute(String name).set(long value);
Attribute.numberAttribute(String name).set(double value);
Attribute.booleanAttribute(String name).set(boolean value);
// Counter attribute:
Attribute.counterAttribute(String name).set(long value); // set counter value
Attribute.counterAttribute(String name).increment(); // increment by 1
Attribute.counterAttribute(String name).increment(long delta); // increment by delta
Attribute.counterAttribute(String name).decrement(); // decrement by 1
Attribute.counterAttribute(String name).decrement(long delta); // decrement by delta
Examples of using:
// example 1 - set attributes after user registration
UserX.applyUserAttributes(
Attribute.stringAttribute("phone number").set("8800000900"),
Attribute.stringAttribute("first name").set("Ivan"),
Attribute.numberAttribute("age").set(45),
Attribute.booleanAttribute("vip account").set(true),
Attribute.counterAttribute("friends count").set(0)
);
// example 2 - user wrote a message in the chat
UserX.applyUserAttributes(
Attribute.counterAttribute("messages written").increment()
);
// example 3 - user made a purchase
UserX.applyUserAttributes(
Attribute.counterAttribute("purchases").increment(),
Attribute.counterAttribute("spent money").increment(3650)
);
Keyboard detection
You can enable or disable keyboard output by using this parameter (disabling reduces system loading):
UserX.setKeyboardRenderingEnabled(boolean isKeyboardRenderingEnabled) // default - true
Trapping exceptions
Enable/disable error handling (enabled by default, when integrated with Crashlytics should be enabled)
UserX.setCatchExceptions(boolean catchExceptions)
Sending events
Sending arbitrary events. You can send arbitrary events to your session, by these events you will be able to search for the session. Use the following methods to send events:
To send events, use following methods:
UserX.addEvent(String firstArg);
UserX.addEvent(String firstArg, String attributeName, String attributeValue);
UserX.addEvent(String name, HashMap attributes);
Hiding personal data
To hide any element of the interface, the content of which should not be displayed in the session
UserX.addSensitiveView(view); // hide
UserX.removeSensitiveView(view); // unhide
You can also suppress the recording of touches:
UserX.setCatchUserTaps(boolean catchUserTaps)
Starting with Android 8, UserX records content from video players. If you need to disable video recording from players - call UserX.addSensitiveView (view) - in this case, the window with the player will be hidden from recording, including all video playback controls. If you need to hide the video and leave the ability to track controls placed on top player - on the screen where the player is displayed, call:
UserX.useOldRenderer(true)
and after exiting this screen:
UserX.useOldRenderer(false)
Hiding personal data in Jetpaсk Compose
Mark the elements that should bee hidden:
val view = LocalView.current
Text(
text = "Hidden Text Here",
textAlign = TextAlign.Center,
fontSize = 20.sp,
fontWeight = FontWeight.Bold,
modifier = Modifier
.onGloballyPositioned { coordinates ->
UserX.markComposeHiddenView("id-1", coordinates)
}
)
// here id-1 is a random unique id view, you can use a random uid
Hidden area has blue color by default. You can set your castom color for hidden area using the following method:
UserX.setFillColor(android.graphics.Color.GRAY)
Disabling recording while scrolling (Jetpack Compose)
To disable taking screenshots while scrolling, use:
UserX.setComposeScrollRenderingEnabled(false)
If you need to enable taking screenshots when scrolling:
UserX.setComposeScrollRenderingEnabled(true) // true by default
Recording WebView
UserX records all content from WebView. If there are fields on the pages displayed in WebView that need to be hidden from recording, call:
UserX.setWebView(WebView webView);
The "input", "textarea", "button" and elements with the "userx-mask" class will be automatically hidden. If you want to hide other elements, call:
UserX.setWebView(WebView webView, String... selectorsToHide);
in selectorsToHide, list all the CSS selectors that you want to hide from writing.
Also, you can specify all CSS selectors that need to be hidden from recording in all registered WebViews by calling the method:
UserX.setGlobalWebViewCssSelectorsToHide(String... selectorsToHide);
GoogleMaps rendering
You can allow UserX to render GoogleMap (reduces performance when working with a map). To do this, use one of the following methods:
/**
* @param mapContainerId MapFragment layout id
* @param googleMap GoogleMap
*/
UserX.setGoogleMap(int mapContainerId, com.google.android.gms.maps.GoogleMap googleMap);
/**
* @param mapContainerId MapFragment layout id
* @param googleMap GoogleMap
* @param googleMapSnapshotPeriod milliseconds, default = 1000ms
*/
UserX.setGoogleMap(int mapContainerId, com.google.android.gms.maps.GoogleMap googleMap, long googleMapSnapshotPeriod);
Yandex MapKit rendering
To render Yandex maps, you need to add yandex:movable="true" to the XML file of your layout in the "com.yandex.mapkit.mapview.MapView" element. And also call in the code:
UserX.setYandexMap(Object yandexMapView)
Scrolling recording
If in your application when using UserX there are performance problems when scrolling through lists, call this method immediately after initializing UserX:
UserX.setScrollRenderingEnabled(false);
Code to get link to the current session:
UserX.getSessionUrl();
Code to get link to all sessions of this device:
UserX.getExternalAnalyticsUrl();
Get a session link
Every time when launch your app , the UserX SDK generates links:
- for current session;
- for all device sessions.
You can use links in your third parties systems for watching video sessions by link.*
*to view videos by the link, you should be authorized in the UserX Console.
To get link for current session call:
UserX.sessionUrl();
To get link for all sessions on this device call:
UserX.externalAnalyticsUrl();
Change video recording quality
UserX.setMediumVideoQuality(); // default value
Possible values:
UserX.setHighVideoQuality();
UserX.setMediumVideoQuality();
UserX.setLowVideoQuality();
* If you need to change the recording quality for all screens, then you need to call when launching the app
Adding UserX Plugin
Download
the latest version of the UserX Plugin for Unity project.
Unzip downloaded file.
Add UserXPlugin to Assets
Initialization
In code that call once add:
UserXKitExtension.Init("API_KEY");
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec.
Sending user ID
You can transferred your internal user ID to UserX. This allow you to find sessions of specific users of your app (for example, after a user contacts support, you can watch his video recording, which will show what he did before contacting support).
UserXKitExtension.SetUserId("YOUR_INTERNAL_USER_ID");
Screen recording settings
UserXKitExtension.StartRecording(); // start video recording
UserXKitExtension.StopRecording(); // stop video recording
Call the startScreenRecord method to start video recording in manual mode. Automatic video recording will also act according to the selected recording settings. To stop video recording, call the stopScreenRecord method. Video recording in any case will be stopped when the application is minimized.
Sending events
console.docs.integration.ios.13
UserXKitExtension.AddEvent("YOUR_EVENT");
Screens registration
UserX automatically registers all screens of your application, including modal windows.
If you have your own implementation of screens that our UserX library does not recognize, you can use one of these methods to manually register screens (call at the time the screen is displayed):
UserXKitExtension.StartScreen("SCREEN_NAME");
UserXKitExtension.StartScreen("SCREEN_NAME", "PARENT_SCREEN_NAME");
Adding UserX Plugin
Download Unity Android Plugin
In the Unity Editor: Assets / Import Package / Custom Package... and select the downloaded file.
Initialization
In code that call once add:
UserXUnityAndroid.UserX.init("API_KEY");
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec.
Sending user ID
To separate video from different users, you can use the userId parameter,
which is set by calling the following method:
UserXUnityAndroid.UserX.setUserId("YOUR_INTERNAL_USER_ID");
Keyboard detection
You can enable or disable keyboard output by using this parameter (disabling reduces system loading):
UserXUnityAndroid.UserX.setKeyboardRenderingEnabled(boolean isKeyboardRenderingEnabled) // default - true
Trapping exceptions
Enable/disable error handling (enabled by default, when integrated with Crashlytics should be enabled)
UserX.setCatchExceptions(boolean catchExceptions)
Sending events
Sending arbitrary events. You can send arbitrary events to your session, by these events you will be able to search for the session. Use the following methods to send events:
UserXUnityAndroid.UserX.addEvent(String firstArg);
UserXUnityAndroid.UserX.addEvent(String name, Dictionary attributes);
Screens registration
If you need to register a screen with its own name or if conditions are necessary, use the method:
UserXUnityAndroid.UserX.addScreenName(String title)
Screen recording settings
UserXUnityAndroid.UserX.startScreenRecording(); // start video recording
UserXUnityAndroid.UserX.stopScreenRecording(); // stop video recording
Call the startScreenRecord method to start video recording in manual mode. Automatic video recording will also act according to the selected recording settings. To stop video recording, call the stopScreenRecord method. Video recording in any case will be stopped when the application is minimized.
Scrolling recording
If in your application when using UserX there are performance problems when scrolling through lists, call this method immediately after initializing UserX:
UserXUnityAndroid.UserX.setScrollRenderingEnabled(false);
Adding UserX
Download
the latest version of the UserX Plugin for Unity project.
Unzip downloaded file.
Add reference for iOS project:
Depedencies -> Add reference -> .Net Assembly -> Browse -> UserX.dll
Initialization
In code that call once add in AppDelegate.cs in method FinishedLaunching:
using UserXBinding;
UserX.Start("USERX_KEY");
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec.
Sending user ID
You can transferred your internal user ID to UserX. This allow you to find sessions of specific users of your app (for example, after a user contacts support, you can watch his video recording, which will show what he did before contacting support).
UserX.UserId = "YOUR_INTERNAL_USER_ID";
Screen recording settings
UserX.StartScreenRecording(); // start video recording
UserX.StopScreenRecording(); // stop video recording
Call the startScreenRecord method to start video recording in manual mode. Automatic video recording will also act according to the selected recording settings. To stop video recording, call the stopScreenRecord method. Video recording in any case will be stopped when the application is minimized.
Sending events
console.docs.integration.ios.13
UserX.AddEvent("YOUR_EVENT", null);
Trapping exceptions
To enable the collection of crash-logs:
UserX.CatchExceptions = true;
Flutter UserX plugin
Add dependency to your pubspec.yaml
dependencies:
userx_flutter: ^1.3.0
Import in your Dart code (main.dart):
import 'package:userx_flutter/userx_flutter.dart';
Initialization
UserX has 3 modes. Each of them has its own initialization method.
Use only one initialization method.
By default, only automatic mode is available to you. The rest of the modes are available only on individual plans.
Mode 1 (default): auto
Initialize UserX in main.dart:
@override
void initState() {
super.initState();
UserX.start("YOUR_API_KEY");
}
Mode 2: SDK manual mode*
*manual mode is available only for iOS
Add in main.dart:
@override
void initState() {
super.initState();
UserX.configure("YOUR_API_KEY");
}
In manual mode, the session and all its events will start recording only after calling the session start method. Recording will end after calling the stop recording method, or after the user minimizes the application.
// both of these methods only work after manual initialization of UserX
UserX.startSession(); // start recording
UserX.stopSession(); // stop recording
Mode 3: manual control of sending a session
Add in main.dart a line:
UserX.start("YOUR_API_KEY", uploadIfMarked: true)
In this mode, the session will be recorded in the same way as in the automatic one, but it will be sent to the server only if the method was called during the session:
UserX.markSessionToUpload();
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec.
Sending user ID
You can transferred your internal user ID to UserX. This allow you to find sessions of specific users of your app (for example, after a user contacts support, you can watch his video recording, which will show what he did before contacting support).
UserX.setUserId("USER_ID");
Sending events
console.docs.integration.ios.13
UserX.addEvent("EVENT_NAME", {"EVENT_PARAM" : "PARAM_VALUE"});
Screen registration
You need to configure screen registration on the app for heat maps and funnels works on Flutter.
Every time when opens new screen on the app, you need call:
UserX.addScreenName(String title)
Screen recording settings
UserX.stopScreenRecording();
UserX.startScreenRecording();
Call the startScreenRecord method to start video recording in manual mode. Automatic video recording will also act according to the selected recording settings. To stop video recording, call the stopScreenRecord method. Video recording in any case will be stopped when the application is minimized.
Enable catch crashes
let enabled = true; // true|false
UserX.setCatchExceptions(enabled);
You need to run (in the ios project folder)
pod update
Get a session link
Every time when launch your app , the UserX SDK generates links:
- for current session;
- for all device sessions.
You can use links in your third parties systems for watching video sessions by link.*
*to view videos by the link, you should be authorized in the UserX Console.
To get link for current session call:
Future <String?> UserX.sessionUrl
To get link for all sessions on this device call:
Future <String?> UserX.allSessionsUrl
Adding UserX SDK
Android
In your project dir:
yarn add react-native-userx
react-native link react-native-userx
In the Android folder of your project, in the build.gradle file, in the allprojects repositories section, add:
maven { url 'https://github.com/userxpro/userx/raw/maven/' }
It should look something like this:
...
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
maven { url 'https://github.com/userxpro/userx/raw/maven/' }
}
}
IOS
Autolinking now works. If you previously tried to integrate and linked manually, then you must first unlink:
react-native unlink react-native-userx
Further integration with the following instructions executed from the project directory:
yarn add react-native-userx
cd ios && pod install && cd ..
Initialization
In your App.js:
let UserX = require('react-native-userx');
UserX.start('YOUR_API_KEY');
Record your first session
After SDK integration:
- Launch the app with integrated UserX.
- Perform several actions in the app, navigate through the screens.
- Press the "Home" button and wait 20 sec.
Sending user ID
You can transfer your internal user ID to UserX. This is necessary to use filters by User ID, also it is needed to disable tracking by User ID.
UserX.setUserId(userId)
To get the user ID that was set previous, call:
UserX.getUserId()
Screens registration
For correctly working heat maps, UserX SDK should register all screens in the app.
To check it, after integration SDK you should to do next steps:
- open all screens in yor app;
- minimize the app;
- check the screens is correctly displayed in the Heat Maps on UserX Console.
Manual screen register:
In some cases, it is needed manual marking for screens. For this when you open the screen use this code:
UserX.addScreenName(name)
Sending events
Sending arbitrary events. You can send arbitrary events to your session, by these events you will be able to search for the session. Use the following methods to send events:
UserX.addEvent('Your Event Name');
UserX.addEvent('Your Event Name', associativeArrayWithParameters) ;
Hiding personal data
To hide any element of the interface, the content of which should not be displayed in the session
<View ref={ x => UserX.hideSensitiveView(x) } />
Get a session link
Every time when launch your app , the UserX SDK generates links:
- for current session;
- for all device sessions.
You can use links in your third parties systems for watching video sessions by link.*
*to view videos by the link, you should be authorized in the UserX Console.
To get link for current session call:
UserX.getSessionUrl()
To get link for all sessions on this device call:
UserX.getAllSessionsUrl()
Third party integrations
UserX allows you to integrate with well-known analytics services to better analyze your applications and user behaviors.
Slack
Connect Slack and UserX will send event notifications and reports to your channel.
Sign in to continueAppMetrica
Upload your reports from AppMetrica directly to UserX for links to video sessions.
Sign in to continueCrashlytics
Configure Crashlytics with UserX to view the sessions with a link from your Crashlytics project.
Sign in to continueGoogle Analytics
Integrate your Google Analytics project into UserX to view video sessions from links from the Google Analytics console.
Sign in to continueAppsFlyer
Connect Userxpro to your application in AppsFlyer to search for user sessions for ad campaigns.
Sign in to continueIntegrated SDK, but sessions are not displayed in UserX console
The session is uploaded to the UserX server after the application is minimized. If for any reason the uploading of the session failed (missing or poor Internet connection), the session will be uploaded the next time the application is launched.
If the application has not been minimized, but is forcibly unloaded from memory, the session will be sent the next time it is launched. The same situation is the forced termination of the application through the development environment (Xcode, Android Studio, etc.). But also in this situation there is a possibility that the session will be damaged, that is, it does not fully correspond to the actual data on the device screen. Therefore, if you are recording your first session, it is highly desirable that the process of completing work with the application most closely matches the actual interaction of the ordinary user with your application - work with the application was completed by pressing the "home" button or "swiped" from the list of active applications. The session will be available in the UserX console in a couple of minutes.
Also note the parameter "session timeout", which you can set in the settings of your application in the UserX console. If the time between application launches is less than its value, then the sessions will be merged into one. This is done in order not to break a logically unified session if the user left your application for a short period of time, for example, to receive an incoming call, or to switch to another application for a short time.
Data storage duration
The storage time of each session on the server is 90 days from the moment the session is saved. After the expiration of this period, the session will be completely removed from the server, while the server will remain a little information about the session to properly account for the number of user sessions and the ability to view the history of sessions. This information will be displayed in the list of user sessions when viewing a session.
The video from the session will be deleted after 60 days. The session itself will remain available until it expires.
If you need to change the duration of data storage let us know in the feedback form.
Session recording restrictions
Users of your application can record sessions of unlimited length.
The limit on the number of sessions of your application correspond to the limits of your tariff plan and the recording parameters you have configured.
List of devices on which video recording is disabled
On the Android platform, we do not impose any restrictions. All devices are available for recording sessions.
If you need to exclude recording on any devices - tell us. We can also reduce the number of recorded frames per second for a specific device in order to improve performance.
On the IOS platform, we have excluded video recording on some devices due to the fact that they have a decrease in application performance with UserX enabled. In this case, the session is recorded on them - duration, clicks, swipes, and all parameters.
- iPod Touch 5
- iPod Touch 4
- iPod Touch 3
- iPod Touch 2
- iPod Touch 1
- Apple TV
- Apple TV 4
- iPhone 4
- iPad 2
- iPad 3
- iPad 4
- iPad 5
- iPad Air 1
- iPad Air 2
- iPad Mini 1
- iPad Mini 2
- iPad Mini 3
If you need to exclude recording on any devices - tell us. We can also reduce the number of recorded frames per second for a specific device in order to improve performance.