Site logo

Archived topic

Add hook on thank you page

1 reply · Started by Pedro on December 6, 2019

Viewing posts 1–2 of 2

Hello! I need to add the Google Ads tracking code to measure conversions (Purchases)

I have contacted them and they tell me that the code should be on the thank you page (WooCommerce) in the <head> </head> tags

The point is, I had added the code, but in the location I had placed Entire site.

What would be the correct location for this hook to only show on the thank you page?

Hi there,

Woo doesn't provide a static thank you page its just the order-received endpoint for the checkout. So you would need to create or redirect to a custom thank you page.

There are plugins available for creating custom thank yous or this article explains how to redirect to a static page:

https://businessbloomer.com/resolved-woocommerce-redirect-custom-thank-page/

Then you can hook your function to that page.

This archived topic is closed to new replies.