ruralking.png

1. Install Social Analytics code

Paste this into your footer.phtml template:

<script type="text/javascript">
var js = document.createElement('script'); js.type = 'text/javascript'; js.async = true; js.id = 'AddShoppers';
js.src = ('https:' == document.location.protocol ? 'https://shop.pe/widget/' : 'http://cdn.shop.pe/widget/') + 'widget_async.js#4e71e1cd2aa35f5079000001';
document.getElementsByTagName("head")[0].appendChild(js);
</script>

2. Install ROI Tracking code

Paste into your success.phtml file:

<?php 
$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId()); 
$amount = number_format($order->subtotal,2); 
?>
<script type="text/javascript">
AddShoppersConversion = {
        order_id: '<?php echo $this->getOrderId(); ?>',
        value: '<?php echo $amount; ?>'
};
var js = document.createElement('script'); js.type = 'text/javascript'; js.async = true; js.id = 'AddShoppers';
js.src = ('https:' == document.location.protocol ? 'https://shop.pe/widget/' : 'http://cdn.shop.pe/widget/') + 'widget_async.js#4e71e1cd2aa35f5079000001';
document.getElementsByTagName("head")[0].appendChild(js);
</script>