For the complete documentation index, see llms.txt.

Migration from the legacy WebView Tracking Tag

Last updated View as Markdown

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

  1. Update the Tag

    <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

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

    📚 See trackPageview.

  3. Update the tracking of transactions

    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 and ec:transaction:send.

  4. Update the dynamic variable tracking

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

    📚 See trackDynamicVariable.