Add Google Analytics Tracking Code to your Theme
Adding tracking code, scripts or other custom code before the
</body> tags in your theme is very simple.
Navigate to → → and insert your Analytics tracking code (not just your Tracking ID) in one of the two available locations: Header or Footer, depending on instructions you have received.
Optionally you can use a 3rd party like Head, Footer and Post Injections or Google Analytics for WordPress to add your tracking code to your site and be sure that it will remain on your site even when you’re switching to a different theme.