Web design, development and general tech.
Many times I come across a website powered by WordPress rife with unused, out of date and abandoned plugins. The first step in remedying this common situation is to review the plugins installed and identify candidates to eliminate. Often I attempt to remove plugins that provide simple, easy to replicate features. One example is Google Analytics. Beginner web folks, and tech averse clients don’t feel comfortable editing a theme by hand, and this is why you typically find a plugin that merely inserts code into a theme – a task quite easy for even the most green web developer.
For a websites with existing performance or stability problems, removing a Google Analytics plugin, or similar is low hanging fruit. However for websites without issues, WordPress plugins that offer connections to the Google Analytics system can provide added features, not easily available when using manual code.
Let’s explore the pros and cons of each. First manual code:
Simple to implement (copy+paste into your theme)
No plugin overhead
Not simple to implement for those tech-averse or unfamiliar with WordPress themes.
Expanded features need to be coded manually.
You need to manually update code if Google Analytics changes.
Without picking a specific Google Analytics plugin, I’m going to highlight the overall pros and cons of this approach.
Simple setup process, usually aided by a graphical interface.
Added features such as outbound link tracking, traffic exclusions for logged in users, integrated reports & graphics.
Assuming the plugin is actively managed, changes to Google Analytics should be accommodated automatically.
Possible added performance overhead from running a plugin.
Plugin bugs could cause issues with the site in general.
Added maintenance related to updating plugin.
I’ll spare you a review of each service, as I’m sure that’s been done before. For what it’s worth I’m trying out Yoast’s solution*.
As I stated above, GA plugins are lightweight enough that you can consider running them without much maintenance or performance fear. They keys to keep in mind are to choose a plugin that is actively managed, stay clear of plugin bloat (make sure this isn’t your one millionth plugin) and actually use the additional data enabled by this plugin. If you’re not going to use the outbound link tracking, or if you’re not concerned with tracking logged in users, then manual code might be the way to go.
*Currently the Google Analytics by Yoast plugin is having troubles authenticating. It appears to authenticate, but when I return to the WP dashboard, the plugin warns me that I need to re-authenticate. This of course highlights one of the cons of using a plugin – with manual code I would not have to authenticate.