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?


6 Answers 6


Please have a look at app/design/frontend/base/default/template/checkout/ as it is the 'new' directory where you find Magento's default template files. Nevertheless Magento would also look at your directory.

Have a look at http://www.magentocommerce.com/knowledge-base/entry/magentos-theme-hierarchy to get an understanding of the theme mechanism.

  • Thanks ... i found it .. i installed facebook tracking but take a look something went wrong store.sottile.tv Ho can install properly ?
    – Paololee
    Dec 23, 2014 at 17:54

Facebook has recommended to use new Facebook Pixel since second half year of 2016, it's better to use the new script and insert them into app/design/frontend[your theme folder]\template\page\html\head.phtml

as following js snippet code:


fbq('init', '590??????????');
fbq('track', "PageView");
fbq('track', 'ViewContent');
fbq('track', 'Search');
fbq('track', 'AddToCart');
fbq('track', 'AddToWishlist');
fbq('track', 'InitiateCheckout');
fbq('track', 'Purchase');
fbq('track', 'Lead');
fbq('track', 'CompleteRegistration');

<noscript><img height="1" width="1" style="display:none"
<!-- End Facebook Pixel Code -->

If you hope to track particular page or event, you can create custom conversion by following this guide: https://www.facebook.com/business/help/780705975381000


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/en_US/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


You need to copy the file and the file structure from you base directory to your theme


app / design / frontend / base / default / template / checkout / success.phtml


app / design / frontend / default / yourtheme / template / checkout / success.phtml

Then modify your file with your facebook pixel.


Copy success.phtml from /frontend/base/default/template/checkout/ to /frontend/defaul/default/template/checkout/

Also have a look at the below post for putting facebook conversion code in the head section for effectiveness


Hope the above information helps

Cheers S


Please refer free facebook pixel extensions with following settings.

https://www.pearlbells.co.uk/facebook-pixel-magento-extension/Facebook pixel settingadvanced facebook pixel settings

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.