This article explains you how to track your order status using google analytics.
Lets have a look .
Please find the below code:
<script type="text/javascript">
  var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'Your analytics code']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
   '<?php echo $trans['id']; ?>',           // transaction ID - required
   'Pantech', // affiliation or store name
   '<?php echo $trans['revenue']; ?>',          // total - required
   '<?php echo $trans['shipping']; ?>',           // tax
   '<?php echo $trans['tax']; ?>',          // shipping
   '',       // city
   '',     // state or province
   'India'             // country
]);
<?php
foreach($this->orderdetails['
?>
_gaq.push(['_addItem',
   '<?php echo $trans['id']; ?>',           // transaction ID - necessary to associate item with transaction
   '<?php echo $item->order_item_sku; ?>',           // SKU/code - required
   '<?php echo $item->order_item_name; ?>',        // product name
   '<?php echo $item->virtuemart_category_
   '<?php echo $item->product_item_price; ?>',          // unit price - required
   '<?php echo $item->product_quantity; ?>'               // quantity - required
]);
<?php } ?>
_gaq.push(['_trackTrans']);
(function() {
    var ga = document.createElement('
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName(
  })();
</script>
 
 
very useful ... great ... thanks to vinoth...
ReplyDelete