To insert the HTML code into the head section of all the pages of your website, go to Site settings → More → HTML code for head-zone.
To insert HTML code into the head section of a specific page, go to Page settings → Additional → HTML code for head-zone.
Note. Don't forget to republish all pages.
Learn more about adding HTML code: http://help.tilda.ws/html