This question already has answers here:
Should I put the Google Analytics JS in the <head> or at the end of <body>? (7 answers)
Closed 5 years ago.
Where’s the best place to insert the Google Analytics code in WordPress, header or footer? I prefer footer, because I wanted my site to load faster by reducing the number of scripts in the header, but can it work even if the script is in the footer?