Migration from the legacy WebView Tracking Tag
To migrate from the legacy WebView Tracking Tag to the latest, follow these steps:
-
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. -
Update pageview tracking
window.cs_wvt.push(["trackPageview", "My Custom Page Title"]);window._uxa.push(["trackPageview", "My Custom Page Title"]);📚 See
trackPageview
. -
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
andec:transaction:send
. -
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
.