Simple Universal Google Analytics Plugin for WordPress

This plugin enables Universal Google Analytics tracking on your WordPress site. A new set of features was introduced in Universal analytics which changes the way data is collected in your Google Analytics account. It will help you get a better understanding of how users interact with your website content.

Why Using This Plugin?

I was thinking of enabling Google Analytics on this website. However, I failed to find any simple and lightweight WordPress plugin that would do the job. Most popular Google Analytics plugins offer too many features that I don’t intend to use. I also don’t know if they will negatively impact the SEO of my website. I’m sure there are other webmasters like me who are concerned about SEO.

Instead of taking any risks I developed this plugin from scratch. All it does is save your Google Analytics ID in the settings and insert the required analytics code into every page automatically when it loads (based on Google’s recommended methods). I also made it a bit smart so it doesn’t track your actions when you are logged in as an administrator or an editor.

Requirements

  1. A self-hosted WordPress site running on a WordPress Optimized Environment.

Installation

You can install the plugin in one of the following ways:

Option 1 (Quick installation)

  • Go to “Plugins->Add New” from your WordPress admin dashboard
  • Search for “Simple Universal Google Analytics naa986”
  • Click Install once you have found it

Option 2 (Manual installation)

  • Download the zip version of the plugin
  • Go to “Plugins->Add New”
  • Click “Upload Plugin”
  • Select the zip file on your computer
  • Install it

Google Analytics Tracking

Once you have installed the plugin,

1) Go to the settings menu of the plugin (Settings->Google Analytics).

screenshot showing the universal google analytics wordpress plugin menu

2) Enter the Universal Analytics ID of your website (you should be able to find it in your Google Analytics account).

screenshot showing the universal google analytics wordpress plugin settings

3) Click “Save Changes”.

And you are done. Universal Google Analytics should be live on your website now. Please check your analytics account to make sure it’s receiving the tracking data. If your website gets traffic regularly it should appear in your Google Analytics account within 2-3 days.

21 thoughts on “Simple Universal Google Analytics Plugin for WordPress”

  1. Doesn’t work on my blog WP ver 4.2.2. Installed & entered my analytics ID and no analytics code is output. Feel free to email me if you want to troubleshoot.

    Reply
    • @terry, Does your theme handle wp_head action hook?

      Reply
  2. How can I track outbound links using this plugin? Thanks!

    Reply
  3. can I enable user id tracking?
    ga(‘set’, ‘&uid’, {{USER_ID}}); // Set the user ID using signed-in user_id.

    Reply
    • @felix, You want to track the WordPress user ID?

      Reply
  4. I have the same problem as terry. Plugin is installed succesfully but the analytics code inside the tag is nowhere to be found. What is wp_head action hook? And how do I make sure that this is enabled?

    Reply
    • @Alexander, wp_head is an action hook that gets triggered when the header section of your site renders. In order to check the code you will need to open your site in a different browser (where you are not logged into the wp-admin dashboard).

      Reply
      • What should I do when I have no wp_head in my source code?

        Reply
        • @Stefanie, Your theme needs to trigger the “wp_head” action hook. Otherwise, the plugin can’t include the necessary code in the header.

          https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head

          Reply
  5. Hi,

    In which section inside Google Analitics can I find the downloads statistics from my website? I installed everything correctly, but I cannot find the download stats.

    Here you can find my download page: https://lekker-leven.com/10-wekenplan-gratis-downloaden-als-ebook-of-epub/

    Thanks

    Reply
  6. Thank you for developing this plugin. I have the exact same issue with the other Analytics plugin, I don’t need the unnecessary feature. Simple Universal Google Analytics Plugin for WordPress is definitely the one I’m looking for.

    Reply
  7. admin hi, Thank you.

    Reply
  8. This is just what I needed! Thanks for developing this simple Google Analytics plugin.

    Reply
  9. Just installed thanks great plugin 🙂

    Reply
  10. Hi. I’ve installed your plug-in and it has enabled Universal Google Analytics tracking on my site. Thanks for your great plug-in.

    Is there a way to link wordpress user ID (i.e: logged user ID10) to Google Analytics instead of seeing anonymous browser user ID (i.e: 1031469502.1614279577) .This way I will be able to know who the actual user is to better understand his behaviour?

    Reply
    • @Sergio, I can try to make it so only admin users will not be tracked. Will it work for you?

      Reply
      • Yes. Thanks in advance for your support.

        Reply
        • @Sergio, Please update the plugin and see how it goes.

          Reply
          • I’ve updated the plug-in. I’ll wait till tomorrow so I can have website traffic during the day and then check if WordPress ID number (except for admin) is captured in Google Analytics.
            Keep you posted

          • @Sergio, That’s not what the update is about. Before this update the plugin wouldn’t add Google analytics tracking data to pages when the visitor is simply logged-in. Now it does for everyone except an administrator.

          • Thanks for the clarification.
            In future versions of the plug-in, are you going to include Wp client ID info to share with Google analytics so we can track the user’s behaviour and not an anonymous unique device that we can not associate to an actual user?

Leave a Comment