4 Best Google Analytics Plugins for WordPress
October 11, 2019
How do you add Google Analytics to a WordPress website? Like with most everything else in WordPress, the best answer is with a plugin. There is no shortage of plugins available to integrate Google Analytics, but some work better than others.
As well, the various plugins you can use take different approaches to integration—some approaches require more technical know-how while others require more analytics know-how. Others are intended for people who don’t want to get too deep into the weeds learning about analytics or code. There are also differences in how tightly integrated Google Analytics and WordPress need to be. As well, plugins differ on how flexible they are to work with and configure.
To see these differences in action, let’s look at the four most common plugins we use at Elementive to add Google Analytics to a WordPress site.
Best for Users Who Want to Customize Code: Insert Headers and Footers
The “Insert Headers and Footers” plugin offers the simplest solution for adding Google Analytics tracking code. It isn’t an “analytics” plugin per se but rather gives you an ability to add code either to a website’s <head> and directly before a website’s closing </body> tag. You can add any code you’d like, which means you can use this plugin to add tracking code for any analytics program, to your site, not just Google Analytics.
After you install the plugin, you can navigate to it under the Settings menu. On the page, you’ll have two fields—one for Scripts in Header and a second for Scripts in Footer.
From this page, you can then paste in your tracking code. For example, in the example below, I’ve pasted in tracking code for Elementive’s Google Analytics and Hotjar accounts. After inserting, click the “save” button (not pictured) and then the code will be active on your website.
As well, there are potential security risks with this plugin, especially for larger organizations where more people have access to WordPress. Anybody with access to the WordPress backend can put any code they’d like in here and, as a result, this field could be used to add spammy or junk code to your website.
WordPress Navigation: After installing the plugin, it can be found under Settings, click on Insert Header and Footers
Best for Users Who Are Code Challenged: GA Google Analytics
The GA Google Analytics plugin is specifically designed to add Google Analytics code to a WordPress website. This can be used by a wide range of users—from those very experienced with analytics to people looking for a simpler solution to add in tracking code.
After installing, navigate to Google Analytics under Settings. For the simplest setup, simply copy in your GA Tracking ID (this ID is available in the same location as your tracking code in Google Analytics under Admin -> Property -> Tracking Info -> Tracking Code). You can then choose the tracking method and tracking code location or leave as the default settings. Then click save.
For more advanced configuration, the plugin provides fields for putting in custom code, custom tracker objects, custom adjustments to the Google Analytics script. The Custom Code field does allow you to put in code for other analytics tools besides just Google Analytics.
However, this isn’t as flexible as something like the Insert Headers and Footers plugin—for example, everything is put in the same location (everything in the <head> or <body> as opposed to splitting it out across the two). As well, the way the custom fields are separated requires a bit more familiarity with Google Analytics to understand the setup. All that said, it isn’t that hard to work with or use and can be a great plugin choice for a large majority of websites.
Also in the advanced configuration settings, this plugin allows for blocking tracking for admin users by checking the “Disable tracking of Admin-level users”. This can be helpful to prevent your traffic and your staff’s traffic from appearing in Google Analytics reports (though it will only block that traffic when you are logged into WordPress).
WordPress Navigation: After installing the plugin, it can be found under Settings, click on Google Analytics
Best for Users Who Want Data in WordPress: Google Analytics Dashboard for WP by Exact Metrics
Next, let’s look at Google Analytics Dashboard for WP by Exact Metrics—which is the most robust plugin considered this far in the article. Unlike the previous two plugins, this plugin not only adds tracking code but it integrates with Google Analytics to bring data from Google Analytics into WordPress.
Not surprisingly, then, this plugin requires more setup. After installing, you’ll have a new item in your WordPress sidebar called “Google Analytics”. Click to that and you’ll be prompted to connect to Google Analytics. You’ll want to click Authorize Plugin, then you’ll be taken to a Google Analytics sign on screen where you will be prompted to allow this plugin to access your data.
After you authorize at Google Analytics, you’ll next need to configure the connection in WordPress by selecting a view. In this case, I’ve selected the “Valid Hostname Filter” for my website. This setup takes a few steps to complete but it isn’t difficult.
Once this basic setup is complete, your website will start tracking. However, you don’t have to stop there. Unlike the other plugins discussed, this plugin gives you more options to configure how the tracking code works. For example, the plugin comes with built-in events you can toggle on or off. With this, you can track different kind of link clicks as unique events.
This is great to have these events (and other configurations) built in. However, it does limit your ability to add your own custom code outside of these pre-built events (or it requires you finding other ways to put in your custom code).
Despite all the abilities to configure and customize Google Analytics, you can’t use this plugin to add other analytics tools to your website. For those, you’d need to use a different method. In a way, this makes sense—this tool is about Google Analytics.
Because of the nature of the plugin, you aren’t required to have any coding knowledge—making this an ideal choice for people who aren’t allowed to add code to their website or don’t have the technical know-how to do so. But, this plugin does require more familiarity with analytics to successfully configure all the advanced settings.
Finally, this plugin does add data directly to your WordPress admin area. Instead of having to login to Google Analytics to view data, you can see (some) of the data directly in this plugin. This can save a few steps and also means that not everybody who must view data needs access to Google Analytics.
WordPress Navigation: After installing the plugin, it can be found in the main navigation menu on the side under Google Analytics.
Summary: This plugin offers a great ability to integrate Google Analytics directly into a website and configure tracking code directly through WordPress, with no coding required. The tradeoff is a loss of flexibility to customize the code outside of the plugin’s parameters. While coding know-how isn’t needed, this plugin works best for people who are more familiar with how Google Analytics operates.
Most Popular: Monster Insights
Finally, we have the most popular tool for integrating Google Analytics into WordPress, Google Analytics Dashboard Plugin for WordPress by MonsterInsights. There is a reason for Monster Insights’ popularity—it provides greater control over using and configuring Google Analytics, plus offers a way to view reports inside WordPress.
Given the more advanced nature of the plugin, more setup work is required. After installing and activating the plugin, you’ll need to connect Monster Insights to Google Analytics. This authorizes Monster Insight to have access to your Google Analytics account. Once connected, you can select the Google Analytics profile Monster Insights should integrate with. From plugin install to connection takes a matter of minutes, although there are a few steps along the way.
Once configured, Monster Insights allows you to adjust settings about how analytics works through the plugin. Some of the features, though, aren’t available for the free level and require upgrading before customizations can be made. Also with the upgrade, you can track things like forms and scrolls. At $200/year for the lowest level (as of this writing), that isn’t unreasonable for smaller companies who are more actively using their analytics and tracking different user behaviors on their website. However, that may be more than a small company that isn’t actively using their analytics would want to invest on an annual basis.
The other advantage to Monster Insights is that you can add in custom code that works alongside the plugin. Though, this code is added before the pageview is sent to Google Analytics, which limits how useful this field can be. For those who wish to do more extensive customization, this might prove to be an unhelpful limit to this plugin. Of course, with all the features this plugin has built in, you may not need to customize the plugin much at all.
After all the configuration is complete, you can begin to see reports about your website’s performance directly in WordPress. For example, this data would appear on your WordPress dashboard. This saves you a step of having to login into Google Analytics to retrieve this data.
WordPress Navigation: After installing the plugin, it can be found on the left main menu navigation, under Insights.
Of these four plugins, which is right for your website? All of them can be. My take on where each plugin is most ideal:
- Insert Headers and Footers – ideal for the expert who wants maximum control OR for people who just want a copy/paste option OR for people who have lots of custom code to add in
- GA Google Analytics – ideal for people who want a simple way to connect GA without viewing code and ideal for people who don’t have a lot of custom scripts running
- Google Analytics Dashboard for WP by Exact Metrics – ideal for analytics experts who don’t know how or aren’t allowed to add custom code to the website
- Monster Insights – ideal for people who aren’t analytics or code experts, who want an easy and low-cost way to configure their analytics setup without messing around with code
Of course, this all begs the question, which category is your business in? What do you need to track on your website? How custom does that solution need to be? Would you be okay with a plugin like Google Analytics Dashboard or Monster Insights with what they offer by default? Do you need to track something more custom, in which case would those plugins would be too limiting for your needs?