How to Add a Conversion Tracking Code to the Thank You/Order Received Page

If you want to track your store’s conversions through the thank you/order received page, you can do so with the code on this page and Flux Checkout for WooCommerce.

Add the following code snippet to the functions.php of your active child theme, or use a Code Snippet plugin.

Please make sure to add your tracking code after the following:

<!-- Conversion tracking code here goes here -->

You can also use the same code snippet to add the conversion tracking code of any analytics tool besides Google.

/**
 * Flux checkout - Add tracking code on Order received/thank you page.
 *
 * @return void
 */
function flux_thankyou_page_tracking_code() {
	if ( ! is_wc_endpoint_url( 'order-received' ) ) {
		return;
	}
	?>
	<!-- Conversion tracking code here goes here -->
	<?php
}
add_action( 'wp_footer', 'flux_thankyou_page_tracking_code' );

Flux Checkout for WooCommerce

Prevent abandoned carts with a slick multi-step checkout experience, designed for your customer’s device.

Was this helpful?

Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.