---
title: Migration from the legacy WebView Tracking Tag - WebView
description: How to migrate from the legacy WebView Tracking Tag
lastUpdated: 15 January 2026
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
---

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",
     { value: 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 VebViews. 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).
