On the internet there are thousand of articles on how to insert external scripts using wp_enqueue_script().
Anyway i didn't find anything explanatory on how to add inline,
<script> enclosed, scripts.
I use to add them in the middle of the page code but i suppose it's not the most elegant way and there should be a better way, so that the script code is automatically moved in the head or the footer.
Edit: I forgot the ' around
<script> so it got cancelled. Now my question should be clearer