UXCam Session Recording Integration for Mobile Apps
UXCam specializes in mobile UX research — unlike Sentry or Datadog, sessions here are recorded with focus on understanding user behavior rather than error diagnostics. Gesture heatmaps, on-screen focus zones, Screen Flow reports — these are tools for UX and product teams, not reliability engineers.
Installation
iOS (Swift Package Manager):
// Package.swift
.package(url: "https://github.com/uxcam/ios-sdk", from: "3.6.0")
import UXCam
// AppDelegate
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = UXCamConfiguration(appKey: "YOUR_APP_KEY")
config.enableAdvancedGestureRecognizers = true
UXCam.startWithConfiguration(config)
return true
}
Android:
// build.gradle
implementation("com.uxcam:uxcam:3.+")
// Application.onCreate()
val config = UXCamConfiguration.Builder("YOUR_APP_KEY")
.enableAdvancedGestureRecognizers(true)
.build()
UXCam.startWithConfiguration(config)
Masking Private Data
UXCam by default masks fields with isSecureTextEntry (iOS) and password type fields (Android). For custom Views with sensitive content:
// iOS — mask specific UIView
UXCam.occlude(view: cardNumberView, hideGestures: true)
// Mask entire screen
UXCam.occlude(view: self.view, hideGestures: false)
// Android — mask View
UXCam.occludeSensitiveView(binding.cardNumberField)
// Mask via XML
android:tag="uxcam_unmask" // exclude from masking
android:tag="uxcam_mask" // force masking
For payment screens, recommend hiding the entire screen via UXCam.tagScreenName("Payment", isOccluded: true) — simpler than masking each element.
Screen Tagging
UXCam auto-detects screen names from ViewController/Activity class names. In practice, names like VC_3_Step2Fragment are unreadable in dashboards. Add explicit tags:
// iOS — screen tag
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
UXCam.tagScreenName("Product Detail")
}
// Android — in Fragment.onResume()
override fun onResume() {
super.onResume()
UXCam.tagScreenName("Product Detail")
}
Custom Events and User Properties
// Event
UXCam.logEvent("add_to_cart", withProperties: [
"product_id": product.id,
"category": product.category,
"price": product.price
])
// User properties (for dashboard segmentation)
UXCam.setUserProperty("plan", value: "premium")
UXCam.setUserProperty("registration_cohort", value: "2024-Q1")
User properties let you filter recordings in the UXCam dashboard by segment: view sessions only for premium users or new cohorts.
Sampling and Recording Control
// Record only 30% of sessions
let config = UXCamConfiguration(appKey: "YOUR_APP_KEY")
config.userAppKey = "YOUR_APP_KEY"
// Start/stop manually
UXCam.stopSessionAndUploadData() // finalize and send current session
// Don't record in debug build
if !isDebugBuild {
UXCam.startWithConfiguration(config)
}
For high-DAU apps, consider sampling: recording 100% of sessions is expensive for UXCam storage. Good strategy — 10% random + 100% error sessions or specific events:
// Force record session on critical event
UXCam.allowShortBreakForAnotherApp(true) // don't end session on app switch
Analytics.shared.onCriticalError { error in
UXCam.logEvent("critical_error", withProperties: ["error": error.localizedDescription])
// Session will be marked and available in dashboard
}
What We Do
- Connect SDK via SPM (iOS) or Gradle (Android)
- Configure masking of sensitive screens and Views
- Add
tagScreenNamefor readable names in dashboard - Add key events and user properties for segmentation
- Configure sampling based on traffic volume
Timeline
Basic integration with masking and tagging: 1–2 days. Pricing is calculated individually.







