---
title: Migrate from the legacy WebView Tracking Tag - WebView
description: Replace the legacy WebView Tracking Tag with the Contentsquare tag in your WebViews, and update your pageview, transaction, and dynamic variable calls
source_url:
  html: https://docs.contentsquare.com/en/webview-tracking-tag/migrate-from-the-legacy-tag/
  md: https://docs.contentsquare.com/en/webview-tracking-tag/migrate-from-the-legacy-tag/index.md
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

To migrate from the legacy WebView Tracking Tag to the latest, follow these steps:

1. **Update the Tag**

   ```javascript
   <script type="text/javascript">
     (function() {
       window._uxa = window._uxa || [];
       var mt = document.createElement("script"); mt.type = "text/javascript"; mt.async = true;
       mt.src = "//t.contentsquare.net/wvt/web-view.js";
       mt.src = "//t.contentsquare.net/uxa/{{YOUR_TAG_ID}}.js";
       document.getElementsByTagName("head")[0].appendChild(mt);
       window.cs_wvt = window.cs_wvt || [];
     })();
   </script>
   ```

   `YOUR_TAG_ID` refers either to a new project or an existing Web project.

2. **Update pageview tracking**

   ```javascript
   window.cs_wvt.push(["trackPageview", "My Custom Page Title"]);
   window._uxa.push(["trackPageview", "My Custom Page Title"]);
   ```

   📚 See [`trackPageview`](https://docs.contentsquare.com/en/web/command-reference/#trackpageview).

3. **Update the tracking of transactions**

   ```javascript
   window.cs_wvt.push([
     "trackTransaction",
   window._uxa.push([
     "ec:transaction:create",
     { revenue: 1000, currency: "EUR", id: "my-transaction-id" }
   ]);

   window._uxa.push(["ec:transaction:send"]);
   ```

   📚 See [`ec:transaction:create`](https://docs.contentsquare.com/en/web/command-reference/#ectransactioncreate) and [`ec:transaction:send`](https://docs.contentsquare.com/en/web/command-reference/#ectransactionsend).

   > **Warning**
   >
   > [Sending purchased products](https://docs.contentsquare.com/en/web/sending-ecommerce-commands/) is not supported when tracking WebViews. If you call it, the command is ignored.

4. **Update the dynamic variable tracking**

   ```javascript
   window.cs_wvt.push(["trackDynamicVariable",
   window._uxa.push(["trackDynamicVariable",
     { key: "AB_ABT_Label_Best_Price_PC", value: "With best price" }
   ]);
   ```

   📚 See [`trackDynamicVariable`](https://docs.contentsquare.com/en/web/command-reference/#trackdynamicvariable).


```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"Migrate from the legacy WebView Tracking Tag","description":"Replace the legacy WebView Tracking Tag with the Contentsquare tag in your WebViews, and update your pageview, transaction, and dynamic variable calls","url":"https://docs.contentsquare.com/en/webview-tracking-tag/migrate-from-the-legacy-tag/","inLanguage":"en","dateModified":"2026-10-14T22:32:37+02:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Contentsquare Technical Documentation","url":"https://docs.contentsquare.com/"}}
```