- If your site designed in HTML platform, you should setup GA code each and every page (in Header or Footer).
- If it is designed in PHP platform or if you used any CMS (Content Management System), no need to add each and each page, Just add it on HOME page, it will be track all pages, to conform this, you can check in internal pages through page source.
And you can know which url how much getting traffic through Google Analytics.
yes, you have to put this code each and every pages if it's html.
and if it's php or cms just word press, then you have put on only one section
You can put that code footer, better if you're putting on header section.