@nstudio/nativescript-smartlook
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@nstudio/nativescript-smartlook

Smartlook SDK for NativeScript.

Comprehensive product analytics & visual user insights.

npm install @nstudio/nativescript-smartlook

For iOS, configure your nativescript.config.ts to use the Swift Package:

ios: {
    SPMPackages: [
        {
            name: "SmartlookAnalytics",
            libs: ["SmartlookAnalytics"],
            repositoryURL: "https://github.com/smartlook/analytics-swift-package.git",
            version: "2.2.4"
        }
    ]
}

Usage

Initialize the SDK with your api key before the app boots:

Application.on(Application.launchEvent, () => {
  Smartlook.start('<api-key>');
});

// bootstrap app...

API

  • Smartlook.start(key: string): Start the sdk session and recording.
  • Smartlook.stop(): Stop recording.
  • Smartlook.isRecording(): boolean: Check status of recording.
  • Smartlook.sessionUrl(withTimestamp?: boolean): string: Get the current session url.
  • Smartlook.setRenderingMode(mode?: SmartlookRenderMode): void: Set current rendering mode.
  • Smartlook.getRenderingMode(): number: Get current rendering mode.
  • Smartlook.setSensitivity(view: View, sensitive: boolean): Set sensitivity to specific View.
  • Smartlook.setUser(id: string, name?: string, email?: string, extraData?: any): Set user details.
  • Smartlook.trackEvent(name: string, properties?: any): void: Track event with optional properties.
  • Smartlook.trackNavigationEvent(name: string): Track navigation event.

License

Apache License Version 2.0

Package Sidebar

Install

npm i @nstudio/nativescript-smartlook

Weekly Downloads

2

Version

1.1.0

License

Apache-2.0

Unpacked Size

30.2 kB

Total Files

16

Last publish

Collaborators

  • nativescript-bot
  • multishiv19
  • rigor789
  • alexziskind1
  • walkerrunpdx
  • bradmartin
  • davecoffin
  • triniwiz