Add Google Analytics manually, or use a plug-in?

I’d suggest either a plug-in or a drop-in section of code in your client’s functions.php file. The advantage of a drop-in is that you can add it once and never have to worry about activating or managing the system once it’s up-and-running.

Here’s a quick explanation of how to add the Google tracking code to your theme’s functions.php file. The code itself will be automatically added to the footer of every page, archive, and post. This is essentially what a plug-in will do, without requiring you to activate/administer the system within the WordPress UI.

Alternatively, you could use Google Analytics for WordPress to do the same thing within the UI.

The choice between plug-in or drop-in is entirely up to you. A drop-in takes about 10 seconds to add with copy-paste. A plug-in takes only slightly longer. The actual setup process within Google Analytics to get your tracking code will take longer than either approach.

Leave a Comment