Example javascript hook

<?php

// Add to your (child) theme's functions.php

add_action( 'wp_head', function() {
?>

<script>
// Paste the javascript code here!
</script>

<?php
}, 100 );