Super Simple Google Analytics

Plugin URI: Contributors: bitacre
Donate link:
Tags: google, analytics, simple, works, tracking, code, head, header, insert, google analytics, javascript, google analytics
Requires at least: 2.8
Tested up to: 4.9.4
Stable tag: 1.7.3

Very simple plugin for reliably inserting your Google Analytics tracking code on every page.


This is a bare bones option for people who are looking to simply insert the basic Google Analytics tracking code into the head section of every page without any fuss.

I've only included the essential options; it's not very exciting, but works reliably.


  1. Download the latest zip file and extract the super-simple-google-analytics directory.
  2. Upload the this directory inside your /wp-content/plugins/ directory.
  3. Activate 'Super Simple Google Analytics' on the 'Plugins' menu in WordPress.
  4. Click 'Settings' underneath the plugin or navigate to Settings > Google Analytics and insert your GA tracking code and click the checkbox to turn it on.
  5. That's it.

Frequently Asked Questions

Can you add this feature I just thought of?

Possibly, I'm trying to keep this as simple as possible, but if it's a really useful/uncomplicated feature that I've omitted I will definitely consider it.


Super Simple Google Analytics Screenshot 1
The bare bones options page.

Super Simple Google Analytics Screenshot 2
Where to find your Google Analytics account number.

Super Simple Google Analytics Screenshot 3
Source of the tracking code inserted just before </body>.



  • Got rid of the maxlength fields for tracking codes with more than 8 digits


  • Purely cosmetic update for WordPress 4.4


  • Added namespacing collision check
  • Minor updates for WordPress 3.5 update


  • Added i18n (multi-language) support
  • Recoded plugin as PHP class
  • Added function to save options when upgrading from very old versions


  • Added option to track integrated adsense stats.


  • Fixed an error causing malformed tracking code to be output.


  • Added a option to toggle tracking of logged in administrators.
  • Added internationalization language support.


  • Fixed error causing population of ALL settings links on plugin menu.


  • Fixed missing ' in Analytics code.


  • Added a location option for code insert.
  • Changed variable names for uniqueness.
  • Lowered insert priority to get closer to /head or /body tags


  • Fixed typo introduced in 1.3.1 update which can disrupt plugin meta links and throw an error in some situations.


  • Fixed Settings link using generic function name which might prevent plugin from being activated.


  • Added a 'default values' function for people doing multiple installations.
  • Clarified/additional code commenting.
  • Fixed weird line break printing in HTML source.


  • Added a Settings link directly to the plugins page for convenience.
  • Made the Settings page look more normal.
  • Changed maxlength of 2nd box to 3 characters (since someone might have more than 99 sites on the same Analytics account).


  • Fixed maxlength of 1st box (from 6 to 8 characters).


  • First released version.
  • There may still be bugs, but I can't find any.

Upgrade Notice


Enables tracking codes with more than 8 digits.


Purely cosmetic update for WordPress 4.4. Happy New Year.


Recommended upgrade, remedies the potential for a class namespacing collision and other minor WP3.5 updates.


Not a critical update, adds i18n support and recoded as PHP class for increased stability.


Not a critical update, adds the ability to track adsense stats when integrated.


Very critical update, version 1.5.0 may not work properly. Thank you to Tacit Slagger for reporting this bug.


Not a critical update, adds an option to not track logged in admin accounts.


Critical update, may interfere with other plugins.


Not a critical update, fixes a missing ' in the Google Analytics code.


Not a critical update, adds a location option for code insert and some code cleanup.


Critical update, fixed function name typo throwing error.


Recommended update, older versions may fail to activate/prevent other plugins from activating.


Not a critical update, adds hardcoded defaults and fixes html line breaks.


Not a critical update, adds setting link to plugins page for convenience.


Allows users with longer GA numbers to use the plugin.

Readme Generator


Donations are graciously accepted to support the continued development and maintenance of this and other plugins. We currently accept Paypal and kind words.

59 Thoughts on “Super Simple Google Analytics

  1. HI –

    Sorry to bother you with this, but I’ve activated this plugin, and when I view the source code, I get this:

    Plugin: Super Simple Google Analytics
    Plugin URL: Super Simple Google AnalyticsYou’ve chosen to prevent the tracking code from being inserted on
    pages viewed by logged-in administrators.

    You can re-enable the insertion of the tracking code on all pages
    for all users by going to Settings > Google Analytics on the Dashboard

    I’m no developer I’m afraid, and have no idea what to do here, can you please offer some advice?

    Thanks so much in advance,

    • No problem Adam,

      When you log in to the WordPress Dashboard (the backend where you write posts and such that the public can’t see), there is a tab on the left side titled “Settings”. Under that tab there should be a sub-menu item titled “Google Analytics”. It’s the settings page where you had to input your Google Analytics ID.

      There should be a box titled “Track administrator hits?” It is unchecked by default. If you check this, than the code will be inserted on pages even when viewed by YOU when you are logged in as the administrator. If you want this to happen, check the box. Otherwise, if you logout of your WordPress account and check the source again, the regular tracking code should be there.

      This option just exists so administrators aren’t counting their own visits. I hope this clears up the problem for you, if not, please let me know.

      • It’s also worth pointing out that if you are using a page caching plugin you won’t see the tracking code in the page source code until the cache is updated. So clear the cache before looking at the source code.

  2. Thank You for all that you Do ..
    .trying out super simple Google Analytics 1.7

  3. L.Julian on October 4, 2012 at 5:55 pm said:

    Hi there,

    Hi there,

    Ok so after you add your tracking code to the ‘Settings’ page – what happens next?
    – Do you not need to insert the code into every individual page of your site?
    – The text on my Editor page looks different to yours, so still not sure what to paste in?
    – Also how would you track all of the data – would you need to log back into your Google Analytics site or would the data be retained in your wordpress dashboard?

    Sorry if these questions are silly but I’m completely new to this.

    Many Thanks,

    • bitacre on October 4, 2012 at 10:45 pm said:

      Hi Li,

      You don’t have to paste anything in an editor, that screenshot is just of a page’s source code to show that the tracking code is inserted.

      All you do is:

      1. Insert the tracking number that Google gave you ( it should be in the format UA-#######-## ) on the Google Analytics tab under the Settings section on your Dashboard.
      2. Make sure you check the insert tracking code checkbox!

      That’s it! It will take about a day for a new Analytics account to start reporting data. You can go to “View Source” in your browser to verify the tracking code is there, but that’s not necessary.

      Hope this Helps

  4. how google analytics help me to check my daily visitors on my site please reply fast

  5. Sergey on October 10, 2012 at 5:55 am said:

    Hi there,

    I set the plugin two days ago and I made everything that you wrote, but I can’t see “Google Analytics” code on pages of my site.

    Please help me.

  6. Hi, I followed your settings yesterday to set up analytics for my site, How would I check the code has been inserted in my site,? where would I look for it?


  7. Hi there,

    I used the Super Simple Google Analytics plugin & entered my GA tracking code. Upon viewing the page source I can see the code is there, however the old code is there as well. The new one is “UA-35232352-1”

    Here is what I am seeing. Any assistance would be greatly appreciated!

    Plugin: Super Simple Google Analytics
    Plugin URL: Super Simple Google Analytics

    window.google_analytics_uacct = “UA-35232352-1”;

    var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’, ‘UA-35232352-1’]);

    (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);

    var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’, ‘UA-29236210-1’]);

    (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);

    • bitacre on November 10, 2012 at 3:13 pm said:

      I can’t really help you with this specifically, sorry buddy. I can tell you that most likely your Analytics code is either hard coded into your theme (probably the header.php file), of you have another Analytics plugin running along side this one.

      All I can tell you with certainty is that my plugin is working. If you have the capability, do a search for the old code in the wp-content directory of the site. Should reveal the problem either way.

  8. Hi, I just tested your plugin and I’ve got a question for you :

    My web shop is “”, and I’ve got also a WordPress blog at “”
    On GA, I recorded my domain and ticked the option “track subdomains”. When I activated this option, the script given by GA include some new arguments :
    _gaq.push([‘_setDomainName’, ‘’]);
    _gaq.push([‘_setAllowLinker’, true]);

    These arguments are not present in your plugin. How to integrate this new arguments ?
    One more question, where your plugin insert the GA script ? I cannot find it in the php pages of my theme

    Thanks in adavnce

    • bitacre on November 29, 2012 at 9:38 pm said:

      If you need to change the tracking code, just edit the SuperSimpleGoogleAnalytics.php file, it is plain text and you can use the plugin editor. You will see the big block of javascript that is the standard Google Tracking code.

      As far as where the code inserts: it depends which insert option you’ve chosen for the plugin:

      • if you choose to insert before the end of the </head>, it will hook the wp_head tag in the header.php file of your theme.
      • If you choose to insert before the end of the </body>, it will hook the wp_footer tag in the footer.php file of your theme.
  9. I just installed on and it is working very well.

  10. Well, it “simply” doesn’t work.

    The google analytics page simply won’t load and tells me that:
    “Status: Tracking Not Installed
    Last checked: Dec 11, 2012 2:42:08 PM PST
    The Google Analytics tracking code has not been detected on your website’s home page. For Analytics to function, you or your web administrator must add the code to each page of your website. “

    And yes, I entered the correct number. Checked it 3 times.

    maybe a different name would be appropriate, as this plugin is clearly not for beginners.


    • …Did you check the option “Insert tracking code?“?

      The other 50,000 beginners using it don’t seem to be having any problems.

  11. This works so much better than the one I was using called “Simple Google Analytics”…could never get that one to work right, but the “super-simple-google-analytics” worked right away.

    Thank you!

  12. Our site has one page that gets a lot of traffic and swamps all other analytics data. This tends to skew all graphics, bounce rate, etc towards the one page. Is there a way to turn off the Analytics code for a single page. This is what we did when our site was hand coded (thank goodness we are not doing that anymore).



    • bitacre on January 20, 2013 at 10:33 am said:

      I can make you a special version where you can disable tracking of individual posts or pages (probably using a custom field), but this is too complicated to be included in the default version. My prices are very reasonable if you want me to whip this up for you, let me know, [email protected]

  13. run the simple effective plugin,thanks!

  14. Hi – I just installed your plugin today. When I look at my GA tracking info page, it says “Tracking Code Not Installed”. Do I just have to wait the 24 hours? I did add my GA tracking ID # and checked the insert tracking code box.
    DId I do anything wrong?

  15. What is the function of the first option (in red) “insert tracking code” ?

    • Its just a way to enable or disable tracking on all pages. I did it so you can temporarily disable tracking if you need to, or so you can mess around with the settings before you make the code live. I suppose its a little unnecessary in retrospect.

  16. I added google analytics to my site and nothing is happening. I don’t see any activity whether negative or positive. Help!

    • bitacre on March 18, 2013 at 1:18 pm said:

      Did you input your adsense id and check the box on the settings page to turn it on? If so, just wait a few hours.

  17. What is the option:

    Track integrated AdSense data?


  18. Fatal error: Cannot use string offset as an array for-wordpress/admin/class-admin.php on line 342

  19. The plugin has been working fine for several months, and now I’m getting this error message:

    Google Analytics for WordPress Configuration

    Fatal error: Cannot use string offset as an array in /public_html/wp-content/plugins/google-analytics-for-wordpress/admin/class-admin.php on line 342

    Any idea what this is?

  20. Mike on May 16, 2013 at 9:26 am said:


    Thank you for the awesome plugin. Does the plugin hard code the UA Tracking code in some file? What file is the UA tracking code inserted? I don’t see it in the footer/header file or any of the page templates files.

  21. Thanks for providing this great plugin!

  22. Have installed plugin through WordPress, ticked insert tracking code, entered my google analytics number, clicked before body, clicked track integrated adsense data.

    However after saving changes the UA code is not found in my view source code on the home page or any other page?

    Any help would be much appreciated


  23. Hi bitacre,

    My blog is running this plugin for over a year without problems, nice and easy one! But I’m a bit confused with some stats GAnalytics is giving me regarding ‘new visitors’ and ‘time spent in the blog’, they are not normal. Then, I was wondering if changing the tracking code from ‘before tag’ (current option) to ‘before tag’ has any known impact or consequences.

    If you’ve got some experience about what this change implies after a year, I would appreciate any hints on this.

    Thanks and regards,

  24. Is it possible to add more than one Google Analytics account number?

  25. Hi,

    I installed this plugin a cople of days ago (I am not a computer progrmmer, hence I used you tube vids to do it). Anyway its been a couple of days now and I dont think its working. When I log into google analytics, everything still says 0. No data at all? I have done what it says above and inputted the google UA number. Everything is switched on/activiated on the settings page so im a bit miffed!


  26. jamesfg on September 5, 2013 at 8:57 am said:

    Any suggestions on how to edit the code for Google Analytics Display / Rmarketing advertising? I tried to modify the single line of code in WordPress as recommended by Google (see link) without success:

  27. just install your plugin, but is not counting , in google analytics ?

  28. Hi, Analytics is asking if I want to “Upgrade to Universal Analytics”? Should I do that? does this plugin work with it? I’ve got at least 1 client claiming it’s not properly tracking hits/visits/etc. Trying to figure out what’s going on.

  29. Perfect Plugin!

  30. How do I get into my Analytics account?
    I can’t find it anywhere.

  31. this plugin works perfect on my web site
    I am using latest WP3.8.1,
    I’ve try other plugins, with no luck.

  32. Thanks for updating me with this analytic plugin, I am new to wordpress but following your blog for updates.

  33. James on March 12, 2014 at 1:17 pm said:


    Is there a reason the plugin doesn’t have an option to use the new Universal Analytics tracking script?

    I would be willing to fork and submit a merge request if there is a public git repo out there.

  34. Hey, thanks for the plugin.
    How would I add the demographics in the plugin?


  35. Amr on May 3, 2014 at 7:37 pm said:


  36. Does this plugin support Universal Analytics? If not, can it be added? Seems to work fine for me still, but the plugin page says it’s compatible up to 3.5, while 3.9 is the current version.

  37. Hi,

    Thanks for this nice plugin! I am using it in my website.

    While I found some difference between the generated code by this plugin and the code I got from Google, and the code by Google has more one field called domain:

    Generate Code:
    _gaq.push([\’_setAccount\’, \’UA-%1$s-%2$s\’]);

    Code from Google:
    ga(\’create\’, \’UA-%1$s-%2$s\’, \’domain-name\’);

    So I changed your plugin to the new code and add a field on setting page in order to input the domain name, finally it looks like:
    ga(\’create\’, \’UA-%1$s-%2$s\’, \’%3$s\’);
    ga(\’send\’, \’pageview\’);

    I have made a patch for my changes and if you’d like to use please let me know where I can upload it or just reply a mail for me.

    thanks, Jing

  38. I am using the plugin for google analysis. But how do I log on to the google analysis for my own web page to see the results? What is the web page? Thanks John

  39. Kaiden on July 24, 2017 at 7:58 pm said:

    The first input for the tracking code does not allow for enough characters. My code has 9 characters in that part (between the “UA-” and “-1”) but this plugin only allows 8.

  40. hello,

    I have a tracking code where the middle numbers are nine digits, can that field size be updated? Thanks for the plugin!

Leave a Reply

Your email address will not be published. Required fields are marked *