SDK Integration

📘

Minimum supported versions

The minimum supported Android version is Jelly Bean (API 18)

The minimum supported iOS version is 13

The minimum supported Cordova CLI version is 10.0.0

The minimum supported Cordova Android engine is 10.1.1

Integration

  1. Add the Cordova plugin to your project:
npm install cordova-plugin-smartlook
cordova plugin add cordova-plugin-smartlook
  1. Setup and start Smartlook using the deviceready callback:
if(document.readyState === "complete") {
  document.addEventListener("deviceready", onDeviceReady, false);
}

function onDeviceReady() {
  	Smartlook.setProjectKey({key: "YOUR_API_KEY"});
  	Smartlook.start();
}

📘

Project API Key

To setup Smartlook, you need your project API Key. You can find your project key in the mobile project settings in the Smartlook app.

  1. If you cannot access TypeScript types, you need to explicitly set the type folder roots. Add the following to your project's tsconfig.json:
"typeRoots": ["./node_modules/@types", "./node_modules/cordova-plugin-smartlook/globalTypes"]

📘

region property

The region property identifies the location of the data center where metadata for your organization is stored. However, this does not ensure that all user data is stored in this region. When implementing the SDK, be sure to input the REGION parameter value as shown in the Smartlook project settings. For more information on where to find your region, see Organization settings.

Smartlook can store metadata in the EU and North America. If you want to change your data storage location, contact Smartlook Sales or Support.

📘

Adaptive frame rate

Due to reported issues with video responsiveness on iOS, we recommend turning off the Adaptive Frame Rate feature, e.g. Smartlook.setAdaptiveFrameRateEnabled({isEnabled: false});.

Smartlook now records all user sessions in your application. All new user sessions will appear in the Smartlook player.

Recording when on a mobile network

The Smartlook SDK only uploads sessions when the device is connected to wifi. If you would like to upload your data when the device is on mobile data, you can enable Upload on mobile (cellular) data in project settings. For more information, see When will session recordings appear on my dashboard?

Mobile upload