Conversion tracking - specific page (e.g. thank you page)

How can i add conversion tracking to a specific page ?
I tried adding a code snippet in “Tracking Tools & Analytics” by creating a custom tool and assign it to a specific page.

but when page load i see and error:
Uncaught ReferenceError: gtag is not defined
at VM4194 thankyou:175

Note that Google Analytics and Google Ads are installed and working OK

Please advise
Thank you !