Ecommerce tracking - having issue


#1

Hi,

I am adding the following code to track the ecommerce orders in my page. When I use firebug and check the scripts, I see the values are rendered correctly. But the page is not rendered back and is just blank -


<!-- Piwik --> 
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://10.239.72.105:55/piwik/" : "http://10.239.72.105:55/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
alert('This is piwik');
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 6);

        <?php 
		foreach($this->getItems() as $_item) {
            $itemId = $_item->getId();
			$itemName = $_item->getName();
			$itemCat = $_item->getCategory();
			$itemPrice = $_item->getCalculationPrice();
			$itemQty = $_item->getQty();
			
			echo 'piwikTracker.addEcommerceItem("' . $itemId . '","' . $itemName . '","",' . $itemPrice . ',' .$itemQty . ');';
			}
         ?>
piwikTracker.trackEcommerceOrder(
			"<?php echo $_item->getOrderId();?>", // (required) Unique Order ID
			<?php echo $this->helper('checkout')->getSubtotalInclTax($_item);?>, // (required) Order Revenue grand total (includes tax, shipping, and subtracted discount)
			<?php echo $this->helper('checkout')->getSubtotalInclTax($_item);?>, // (optional) Order sub total (excludes shipping)
			0.0, // (optional) Tax amount
			0.0, // (optional) Shipping amount
			false // (optional) Discount offered (set to false for unspecified parameter)
			);
			piwikTracker.trackPageView();
}catch (err) {
alert(err.message);
}
</script>
<!-- End Piwik Tracking Code -->

chrome just renders back a blank page, whereas firefox gives me following error -

[Exception… “Out of Memory” nsresult: “0x8007000e (NS_ERROR_OUT_OF_MEMORY)” location: “JS frame :: http://c.jirafe.com/jirafe.js :: getImage :: line 1” data: no]

Am i missing something here?? Kindly advice…

Thanks,
Shyamala K


(Matthieu Aubry) #2

it seems there is a problem with JIRAFE so please remove that and try again?


#3

Actually I did that too, uninstalled Jirafe manually, still I am getting the same error, this time it is showing piwik.js instead of Jirafe…Any other suggestions??


(Matthieu Aubry) #4

what is the generated piwik code?