Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Add UnBounce tracking code to WooCommerce Thank You Page WordPress


I need to add the code shown here:

To my WooCommerce "Thank You" page, that customers get sent to, after a successful sale.

Not entirely sure how to add the code, since Wordpress doesn't really like adding code on pages.

Answers (2)


Kyle answers:

Woocommerce allows you to override the default templates by creating a copy inside your theme folder. Once you create the copy you can insert a function to add the appropriate code to the page.

Kyle comments:

So create a folder called 'woocommerce' inside your theme

Inside that folder create another folder called 'checkout'

Copy the file thankyou.php file from /wp-content/plugins/woocommerce/templates/checkout/ folder to your new 'checkout' folder in your theme

Kyle comments:

Once you do that you can add your code to the new thankyou.php file. This is what it could look like if you want to just insert it with the page content:

Although, many themes have an extra hook for right before the closing </body> tag, which is the ideal place to put the code. If yours does you can insert your code with a function on the template.


isp_charlie answers:

i can help with informations wich you sent me yesterday?

philipzeplin comments:

Sure, that would be awesome!

isp_charlie comments:


philipzeplin comments:

Checked, looks correct! Thanks!