Theme html code include

How to install the html code of the counter (yandex metrika) or another one yourself. For example, the banner code?