Adding javascript to header of MetroMagazine theme

Don’t edit theme files. Your changes will be overwritten when your theme updates.

Instead use a child theme and hook into the wp_head function. Add this to your child theme’s functions.php file.

function add_js() {
?>
    <script>
        Your JavaScript goes here
    </script>
<?php
}
add_action('wp_head', 'add_js');

BTW, as you have a commercial theme, you can also get support from your theme vendor.