Migration from the WebView Tracking Tag
Migration from the WebView Tracking Tag
Section titled Migration from the WebView Tracking TagTo migrate from the WebView Tracking Tag to the Web Tracking Tag, follow these steps:
-
Update the Tag
Replace the WebView Tracking Tag:
//t.contentsquare.net/wvt/web-view.jsWith the Web Tracking tag of your project (either a new tag or the one from a Web project):
//t.contentsquare.net/uxa/YOUR_TAG_ID.javascript -
Update pageview tracking
Replace the current
trackPageview
command:window.cs_wvt.push(["trackPageview", "My Custom Page Title"]);With:
window._uxa.push(["trackPageview", "My Custom Page Title"]);📚 See more about the trackPageview command.
-
Update the transaction tracking
Replace the legacy WebView Tracking Tag transaction command:
window.cs_wvt.push(["trackTransaction",{ value: 1000, currency: "EUR", id: "my-transaction-id" },]);With the transaction commands from the Web Tracking Tag:
//Create the transactionwindow._uxa.push(["ec:transaction:create",{id: "123" /* Transaction ID (string, up to 40 chararacters) */,revenue:"9.99" /* Transaction's total cost (integer or string, up to 12 digits and 2 decimals - extra decimals are truncated) */,currency:"usd" /* optional - Currency value (string, numeric or alphanumeric ISO 4217 value) */,},]);//Send the complete transactionwindow._uxa.push(["ec:transaction:send"]); -
Update the dynamic variable tracking
Replace the legacy WebView Tracking Tag dynamic variables command:
window.cs_wvt.push(["trackDynamicVariable",{ key: "my_key", value: "my_value" },]);With the dvar command from the Web Tracking Tag:
window._uxa.push(["trackDynamicVariable",{ key: my_key, value: my_value }]);