How does Heap work with WebViews?

WebViews serve web pages through mobile apps. Heap autocapture for WebViews is achieved by installing our web SDK on the underlying website.

For native apps using current SDKs, it's possible to combine native sessions with WebView events. See Continuing Mobile Sessions in WebViews to learn more.

WebView support is only available for native Android and iOS apps at this time; it is not supported with the React Native SDK or Flutter, MAUI, or Capacitor bridges.

The Classic Native SDKs do not support continuing mobile sessions in WebViews; if you're using the Classic SDK and want to use this feature, you will need to switch to the new SDKs.

Sessions (ie, period of activity) are defined differently in Heap for web vs. mobile. A web session ends after 30 minutes of inactivity, while a mobile session ends after 5 minutes of inactivity. However, any time an event occurs in the webview, it extends the mobile session by an additional 30 minutes. 

How do WebViews impact session behavior?

A session involving webviews will use a mix of our web SDK and our mobile SDK. As a result, for any given session, two session IDs will be created (one for the web portion and one for the native portion).

Webviews can be distinguished from true website visits by looking at the Browser property of a session. For example, webviews on iOS will have a browser value such as Mobile Safari UIWebView.

Last updated
Powered by Zendesk