> For the complete documentation index, see [llms.txt](https://docs.luciq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luciq.ai/flutter/setup-luciq-for-flutter/flutter-webview-support.md).

# WebView Support

## Overview

WebViews are components that embed web content within native mobile applications. The Luciq SDK can automatically detect and monitor WebViews in your Flutter app.

This feature is available from SDK v**19.7.0**.

When enabled, WebView support allows you to:

* Report **WebView screen loading times** in APM
* Capture **user interactions** inside WebViews (tap, scroll, navigation)
* Log **network requests** (Fetch/XHR) triggered by WebViews

This helps you get full visibility into hybrid app experiences where native and WebView content are combined.

## WebView Data Enrichment

Enabling WebView detection enhances multiple Luciq products:

### WebViews in APM

WebView loading times are reported alongside native screen loading metrics. This helps you measure and optimize performance across both native and web-based content.

### WebViews in Bug Reporting, Crash Reporting, and Session Replay

* **User interactions** inside WebViews are captured (navigation, swipe, tap, scroll)
* **Network logs** from requests made inside WebViews (Fetch/XHR) are automatically captured
* Both appear in the logs section; user interactions also appear in Repro Steps

## Setup

### Master WebView Tracking API

The Master API controls all WebView data collection at runtime, including:

* User interactions
* Network logs
* Screen loading in APM

By default, the Master API is **disabled**. Enable it after `Luciq.init`:

{% tabs %}
{% tab title="Dart" %}

```dart
Luciq.setWebViewMonitoringEnabled(true);
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The Master API alone doesn't enable tracking—it only allows these features to work. You still need to explicitly enable each feature (user interactions, network logs) using their respective APIs.
{% endhint %}

### User Interactions & Network Logs

By default, user interactions and network logs inside WebViews are **disabled**. Enable them at runtime:

{% tabs %}
{% tab title="Dart" %}

```dart
// Track taps and other user interactions inside WebViews.
Luciq.setWebViewUserInteractionsTrackingEnabled(true);

// Log network requests issued from WebViews.
Luciq.setWebViewNetworkTrackingEnabled(true);
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
`setWebViewMonitoringEnabled` must be enabled for `setWebViewUserInteractionsTrackingEnabled` and `setWebViewNetworkTrackingEnabled` to take effect.
{% endhint %}

## API Summary

| API                                           | Purpose                                           | Default |
| --------------------------------------------- | ------------------------------------------------- | ------- |
| `setWebViewMonitoringEnabled()`               | Master switch for all WebView tracking at runtime | `false` |
| `setWebViewUserInteractionsTrackingEnabled()` | Capture user interactions in WebViews             | `false` |
| `setWebViewNetworkTrackingEnabled()`          | Capture network logs from WebViews                | `false` |

{% hint style="warning" %}
If `setWebViewMonitoringEnabled(false)` is set, all other WebView APIs will have no effect.
{% endhint %}

## Requirements

* Luciq SDK version v19.7.0 or later
* On Android, only the native `WebView` class is supported


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.luciq.ai/flutter/setup-luciq-for-flutter/flutter-webview-support.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
