---
title: Track WebViews - React Native (classic)
description: Track webviews with the Contentsquare bridge for React Native
lastUpdated: 14 April 2026
source_url:
  html: https://docs.contentsquare.com/en/react-native/track-webviews/
  md: https://docs.contentsquare.com/en/react-native/track-webviews/index.md
---

> Documentation index: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

The latest CSQ SDK is here! Learn how to [upgrade your app](https://docs.contentsquare.com/en/csq-sdk-react-native/experience-analytics/upgrade-from-cs-sdk/).

WebView tracking links the Contentsquare SDK to the JavaScript tag running inside your WebViews to support analytics and Session Replay for web content displayed within your app.

React Native compatibility

Contentsquare only supports the [`react-native-webview` ↗](https://github.com/react-native-webview/react-native-webview) library for tracking WebView components in React Native apps.

Contentsquare's implementation relies on `react-native-webview` internals and is not compatible with other WebView implementations.

## Enable tracking in WebViews

### Inject the Bridge between the CS Tag in WebView mode and the SDK

To inject this JavaScript, you will use our `CSWebView` component to render your WebView, as detailed bellow.

Here is a screen with a `react-native-webview` WebView component.

```jsx
import { WebView } from "react-native-webview";
const WebviewWithTagScreen = () => {
  return (
    <>
      <WebView source={{ uri: "https://www.mywebpage.com" }} />
    </>
  );
};
export default WebviewWithTagScreen;
```

Let's walk through how we can inject it with a custom JavaScript interface.

#### CSWebView component

To inject your WebView with the Contentsquare JavaScript WebView interface you will need to wrap your original WebView with `CSWebView` component. `CSWebView` component will handle all.

```jsx
import { WebView } from "react-native-webview";
const WebviewWithTagScreen = () => {
  return (
    <>
      <CSWebView>
        <WebView source={{ uri: "https://www.mywebpage.com" }} />
      </CSWebView>
    </>
  );
};
export default WebviewWithTagScreen;
```

### Inject the CS Tag in WebView mode into your HTML page

After doing all the above, in order for the implementation to be completed, you will need to make sure our **CS Tag in WebView mode** is injected on your pages. To do so, refer to 📚 [Mobile Apps WebView Tracking Documentation](https://docs.contentsquare.com/en/webview-tracking-tag/).

## Migrating from version 4.X.X to 5.X.X

If you are migrating from a previous version of the Contentsquare React Native SDK, update your `CSWebView` implementation:

```jsx
import React from "react";
import { WebView } from "react-native-webview";
import { CSWebView } from "@contentsquare/react-native-bridge";


const WebviewWithTagScreen = () => {
  return (
     // This method is deprecated
     <CSWebView
      url="https://www.mywebpage.com"
      renderWebView={(onLayout, webViewUrl) => {
        return (
          <WebView
            onLayout={onLayout}
            source={{ uri: webViewUrl }}
          />
        );
      }}
    />
    <CSWebView>
      <WebView source={{ uri: "https://www.mywebpage.com" }} />
    </CSWebView>
  );
};


export default WebviewWithTagScreen;
```

## Known limitations

For iOS only

An issue has been identified with the `goBack()` method of the React Native WebView component. When this method is called, it may not be registered by Session Replay in some cases, leading to some webview pages not being replayed correctly.
