Smartlook Session Recording Integration for Mobile Apps
Smartlook stands out from UXCam through one key feature: automatic event tracking. The SDK analyzes gestures and UI element interactions, automatically creating events without code. When a user taps the "Buy" button, an event is created, linked to the session, and available in the funnel. For quick launches, this accelerates analytics: tracking without instrumentation.
Installation
iOS:
// Swift Package Manager
.package(url: "https://github.com/smartlook/smartlook-ios-sdk", from: "2.0.0")
import Smartlook
// AppDelegate or @main App struct
@main
struct MyApp: App {
init() {
Smartlook.setup(key: "YOUR_API_KEY")
Smartlook.start()
}
var body: some Scene {
WindowGroup { ContentView() }
}
}
Android:
// build.gradle
implementation("com.smartlook.recording:app:2.+")
// Application.onCreate()
Smartlook.setupAndStartRecording("YOUR_API_KEY")
Rendering Configuration
Smartlook uses screenshot-based recording by default. For apps with WebView or custom graphics this is preferable—wire-frame doesn't reproduce such elements properly.
You can switch rendering mode:
// iOS – rendering configuration
let setupConfig = Smartlook.SetupConfiguration(key: "YOUR_API_KEY")
setupConfig.renderingMode = .native // wire-frame: less bandwidth
// or
setupConfig.renderingMode = .noRendering // events only, no video
Smartlook.setup(configuration: setupConfig)
Automatic Event Tracking
Smartlook automatically creates events for:
-
click— tap on any interactive element -
input— interaction with text field (without content) -
focus— focus on field -
scroll— list scrolling
// Check auto-tracking in logs (debug)
Smartlook.setEventTrackingMode(.fullTracking) // everything
// or
Smartlook.setEventTrackingMode(.ignoreUserInteractionEvents) // custom only
For specific elements you can assign readable names—otherwise dashboard shows UIButton@(123,456):
// iOS – element name for auto-tracking
let purchaseButton = UIButton()
purchaseButton.slTrackId = "purchase_button_pdp" // Smartlook track ID
// Android – via View tag
binding.purchaseButton.tag = Smartlook.registerBlacklisted(binding.purchaseButton) // exclude
// or name:
SmartlookHint.setViewId(binding.purchaseButton, "purchase_button_pdp")
Data Masking
// iOS – mask specific View
view.slSensitive = true // hide from recording
// Mask entire UIViewController
class PaymentViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
Smartlook.setViewIsSensitive(view, isSensitive: true)
}
}
// Android – mask via XML attribute
<EditText
android:id="@+id/cvvField"
app:smartlook_sensitive="true" />
// Or programmatically
Smartlook.registerSensitiveView(binding.cvvField)
Custom Events and Funnels
// Custom event
Smartlook.trackCustomEvent(name: "checkout_step_completed", props: [
"step": "payment_method",
"method": "card"
])
// User properties
Smartlook.setUserIdentifier("user_123", sessionProperties: [
"plan": "premium",
"country": "US"
])
In Smartlook dashboard you can build a funnel from any combination of automatic + custom events. No need to pre-define funnel in code—assemble it retroactively from already-recorded events.
Sampling
// Record 25% of sessions
let config = Smartlook.SetupConfiguration(key: "YOUR_API_KEY")
config.framerate = 2 // fps for screenshot mode (1-10)
// Start recording conditionally (e.g., only for specific segment)
if user.isPremium || user.isInBetaGroup {
Smartlook.start()
} else {
// 20% random
if Int.random(in: 0..<5) == 0 {
Smartlook.start()
}
}
What We Do
- Connect SDK and select rendering mode (screenshot vs wire-frame)
- Configure masking of sensitive Views and screens
- Assign
slTrackId/SmartlookHintto key UI elements - Add custom events aligned with business funnel
- Configure sampling based on traffic volume
Timeline
Basic setup: 4–8 hours. With element labeling and custom events: 1–2 days. Cost calculated individually.







