You will need to add the script to the header.php file of the theme in order for it to work in that case.
You can go to APPEARANCE > Editor and select header.php.
Paste in the script code above the