yavonz15 Posted November 22, 2023 Share Posted November 22, 2023 Hello, I need to add a tracking script to the success page (ShopALike) and it asks me to insert this script. <!-- Shopalike.it code for sales tracking --> <script type="text/javascript"> var vmt_pi = { 'trackingId': 'it-7GQPIM77QC', // Tracking ID, parametro fornito da Visual Meta 'version': 'a_0.0.1', // Versione del Sales Tracking implementata 'type': 'confirmed', // Identifica il tipo di pagina, ovvero la pagina di checkout dell'ordine 'amount': {$order.totals.total_including_tax.amount}, // Valore netto del carrello (tasse escluse) 'skus': ['12345-05-WHT-XL', '12345-05-WHT-L','12345-05-WHT-S'], // Codice articolo dei prodotti in carrello, separati da una virgola 'prices': [5.49, 10.00, 5.00], // Prezzo dei prodotti in carrello nello stesso ordine, separati da una virgola 'currency': 'EUR' // Valuta }; </script> <script type="text/javascript"> var vmt = {}; (function(d, p) { var vmtr = d.createElement('script'); vmtr.type = 'text/javascript'; vmtr.async = true; var cachebuster = Math.round(new Date().getTime() / 1000); vmtr.src = ('https:' == p ? 'https' : 'http') + '://www.shopalike.it/controller/visualMetaTrackingJs?cb=' + cachebuster; var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vmtr, s); })(document, document.location.protocol); </script> My doubt is how to insert a foreach for sku's and product prices. Could you please help me? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now