title: Insert javascript code into the head tags of the woocommerce thank you page
body: <p>I'm trying to add some google tracking script to my thank you page. I've written this code which successfully injects the tracker into the  of the thank you with dynamic values, but I need, instead, to add it within the  tags.</p>
  
  <pre><code>function mv_google_conversion( $order_id ) {
      $order = new WC_Order( $order_id );
      $currency = $order-&gt;get_currency();
      $total = $order-&gt;get_total();
      ?&gt;
      &lt;script&gt;
        gtag('event', 'conversion', {
            'send_to': 'AW-746876528/x5W1CLfA8JoBEPDckeQC',
            'value': &lt;?php echo $total; ?&gt;,
            'currency': '&lt;?php echo $currency; ?&gt;',
            'transaction_id': '&lt;?php echo $order_id; ?&gt;'
        });
      &lt;/script&gt;
      &lt;?php
    }
    add_action( 'woocommerce_thankyou', 'mv_google_conversion' );
  </code></pre>
  
  <p>How would I be able to use this code, with the dynamic values in header.php, or is there a hook that targets the  tags on the woocommerce thank you page.</p>