Global Site Tag not working with WordPress, WooCommerce

I’ll love to know what is wrong in the code below.
I’m using WordPress + WooCommerce and my site tag makes my website crash when I upload this functions.php
-> The global site tag is in the head, detected by the google tag chrome extension
-> The conversion tracking code is in functions.php and it need to be visible only in the thank you page when the order is done.