• Hey,

    This is a great plugin and is helping me achieve this easily. One problem I am having troubles with is adding the amount to the conversion code in the JS. I have tried to add the woocommerce total code for PHP into the plugin text area, but it does not seem to work. Any help would be really appreciated in getting the actual amount in the cart added here.

    eg see below is just returning the text code of ‘<?php echo $order->get_formatted_order_total(); ?>’ in the appropriate area.

    Thanks

    <!– Facebook Conversion Code for FB ads –>
    <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’, ‘111111111’, {‘value’:'<?php echo $order->get_formatted_order_total(); ?>’,’currency’:’USD’}]);
    </script>
    <noscript><img height=”1″ width=”1″ alt=”” style=”display:none” src=”https://www.facebook.com/tr?ev=111111&cd%5Bvalue%5D=&lt;?php _e( ‘Total’, ‘woocommerce’ ); ?>&cd[currency]=USD&noscript=1″ /></noscript>

    https://www.ads-software.com/plugins/woocommerce-conversion-tracking/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Amount in conversion code’ is closed to new replies.