Skip to main content

Disable WebView Injection

Disable all Fullstory processing and JavaScript injection for a mobile WebView.

The Fullstory mobile capture plugin automatically injects the Fullstory web snippet into every WebView in your app so that it can capture allowlisted domains. For some WebViews, this may not be desirable (for instance, Apple Pay will not work in a WebView if external JavaScript has been injected). If you wish to disable all Fullstory-related JavaScript processing for a specific WebView, you can set the fullstoryInjectionDisabled property on the WKWebViewConfiguration that you pass to [WKWebView initWithFrame:configuration:]. Doing so will disable all processing from Fullstory, which will also prevent any domains from being captured for this WebView, regardless of allowlist settings.

This must be set on a WKWebViewConfiguration before it is associated with a WKWebView. Modifying this property in the WKWebViewConfiguration after it has been passed to a WKWebView's initializer is not guaranteed to have an effect on that WKWebView.

Note: excluding a WebView is not sufficient to prevent Fullstory JavaScript from being injected.

Additional Information

Example Usage

WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
config.fullstoryInjectionDisabled = YES;
WKWebView *webView = [[WKWebView alloc] initWithFrame:self.view.bounds configuration:config];