25

How to Add Facebook Purchase Conversion Event to WooCommerce Thank You Page

Powered by WPCodeBox

Add the Facebook “Purchase” conversion event to your WooCommerce thank you page. Ensure the Facebook Pixel Snippet is enabled for proper tracking.


<?php 

add_action( 'woocommerce_thankyou', function() { ?>
    <script>
        fbq('track', 'Purchase');
    </script>';
<?php } 
);

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.