I am trying to add Facebook conversion tracking but i cannot find the following file success.phtml
The right path it should be this one: app/design/frontent/default/default/template/checkout/success.phtml
- I couldn’t find.
Any idea?
I am trying to add Facebook conversion tracking but i cannot find the following file success.phtml
The right path it should be this one: app/design/frontent/default/default/template/checkout/success.phtml
- I couldn’t find.
Any idea?
The easiest way to do this is in template\checkout\success.phtml, (pls note in your local package)
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
(function() {
var fbq = window.fbq || (window.fbq = []);
if (!fbq.loaded) {
var fbds = document.createElement('script');
fbds.async = true;
fbds.src = '//connect.facebook.net/enUS/fbds.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
})();
window.fbq = window.fbq || [];
window.fbq.push(['track', 'XXXXXXXXXX', {'value':'getBaseGrandTotal() ?>','currency':'GBP'}]);
or simply use any extensions like https://www.scommerce-mage.com/magento-facebook-conversion-audience-tracking.html