Adding tracking code to thank.you.php file
-
Hello, I am trying to add my google conversion code into the woocommerce/checkout/thankyou.php file via FTP, to track once a purchase is confirmed. Could someone quickly confirm where I am suppose to place the code snippet in the file? The instructions says to place between the </body> tags, but I don’t see “</body>” anywhere in the existing code in this php file. Please help?
Thank you!
I pasted part of the section from my thankyou.php file here that I think applies:
<p class=”woocommerce-thankyou-order-received”><?php echo apply_filters( ‘woocommerce_thankyou_order_received_text’, __( ‘Thank you. Your order has been received.’, ‘woocommerce’ ), $order ); ?></p>
<ul class=”woocommerce-thankyou-order-details order_details”>
<li class=”order”>
<?php _e( ‘Order Number:’, ‘woocommerce’ ); ?>
<?php echo $order->get_order_number(); ?><li class=”date”>
<?php _e( ‘Date:’, ‘woocommerce’ ); ?>
<?php echo date_i18n( get_option( ‘date_format’ ), strtotime( $order->order_date ) ); ?>
- The topic ‘Adding tracking code to thank.you.php file’ is closed to new replies.