In the site options, I tried to add the script code to a parameter that eventually would add the peace of code to the header of the master page, I couldn't find any element that would do that. I added the peace of code as a new parameter, however I don't know how to add the parameter to the page.
Any thoughts?