Should You Put Google Analytics Code In WordPress Header or Footer
The Benefits of Adding Analytics Code into Header Your page may prevent running your footer scripts due to other JavaScript errors or performance issues of other scripts/components. This is why Google recommends you add your tracking code in the header of your site.