Facebook Conversion Code
Client has asked us to install Facebook conversion code on their checkout success pages. It looks like this:
<!-- Facebook Conversion Code for Checkout success customers -->
<script>(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', '6018866625924', {'value':'0.00','currency':'GBP'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=6018866625924&cd[value]=0.00&cd[currency]=GBP&noscript=1" /></noscript>
I've not received any instruction, apart from the code above, so I'm assuming it slots into the head section of our checkout_success.php page - please correct me if I'm wrong there - but how do I replace the 0.00 value with that of the eCart Grand Total?
It occurs twice...once in the first script section, and then in the URL that's referenced in the second script section.
Thank you.
NJ