-- HikaShop version -- : Essential 2.2.2
-- Joomla version -- : 3.2.3
In Google Analytics we would like to track the conversion of items in orders. In a tutorial I found the code below that should be placed on the thank-you-page. But how do I get the variables like transfer ID or the total price?
_gaq.push(['_addTrans',
'<?php echo trans_id; ; ?>', // Ordernummer
'<?php echo 'Webwinkel Lotje'; ?>', // Naam webwinkel
'<?php echo trans_total; ?>', // Totaalbedrag bestelling
'<?php echo trans_tax; ?>', // BTW
'<?php echo trans_shipping; ?>', // Verzendkosten
'<?php echo shipping_city; ?>', // Stad
'<?php echo shipping_state; ?>', // Provincie
'<?php echo shipping_country; ?>' // Land
]);
foreach ($items as $item} {
_gaq.push(['_addItem',
'<?php echo trans_id; ?>', // Ordernummer
'<?php echo $item_sku_code; ?>', // Artikelnummer
'<?php echo $item_name; ?>', // Productnaam
'<?php echo $item_category; ?>', // Categorie
'<?php echo $item_price; ?>', // Productprijs
'<?php echo $item_quantity; ?>' // Aantal
]);
}