This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Google Analytics Visits


This wordpress plugin uses GAPI (by Stig Manning) to fetch data from your analytics account and displays user visits from each country in the widget with Country Flags. You will have to enter your analytics account details in the options page “Google Analytics Visits”.


  • Various display options: (Option to display Country Names or Flags or Both with user-defined number of results) , (Option to hide header ( Flags Country… )), (Option to display – Visits, Total Visits, Pageviews, Total Pageviews with percentages if you choose to hide the actual visits count), (Option to display – Total Countries that visited).
  • Flags: Stats with country flags (New: With CSS Sprite support).
  • Cache support: feature to lessen the load on google analytics and in-turn page loading of wordpress page, where the widget is placed, will be faster.
  • Error Handling: Error handling/reporting in case of wrong username/password or Profile ID.


  • This plugin is a personal open source project. Started in 2009, I have put considerable amount of hours adding, refining, tuning, fixing, maintaining the plugin with the goal to make it useful and add to WordPress community. I need your help to achieve this.


More plugins by PepLamb:


Installing should be a piece of cake and take fewer than five minutes.

  1. Download it.
  2. Extract all files from the zip archive.
  3. Copy the “google-analytics-visits” folder to wp-content/plugins/
  4. Activate the plugin through the “Plugins” menu in wordpress.
  5. Go to the options page (Settings->Google Analytics Visits) enter the settings of your Analytics Account, username/password, enter the Profile ID of your website (get Profile ID from Analytics Home Page -> Actions -> Edit (Edit Profile) ), please look at screenshots for more help!
  6. Add the widget to the sidebar and give it a title or leave the title blank.

That’s it!


Contributors & Developers

“Google Analytics Visits” is open source software. The following people have contributed to this plugin.



  • Maintenance Release.
  • Admin Mobile Enabled.
  • Tested up to WP 3.8.

  • Maintenance Release.
  • Tested up to WP 3.7.1.

  • Maintenance Release.
  • Corrected typos.
  • Upgraded GPL Licence from 2 to 3.

  • Maintenance Release.
  • Added video help url for finding Profile ID.

  • Maintenance Release.
  • Tested compatibility with WordPress Version 3.5.1.

  • Maintenance Release.
  • Fix: Corrected Typos thanks to Etienne for pointing it out.


  • Maintenance Release.
  • Fix: Stats will now update thanks Morten Ross ( ) for spotting the cause.
  • Fix: Disabled Total Countries for now until I find the fix to the issue.

  • Maintenance Release.
  • Fix: Fixed UK flag.
  • Improved: HTML to have W3C Standards Compliance!
  • Improved: GAPI!
  • Removed: non-GPL code.
  • Code Cleanup: Removed unnecessary code.

  • Maintenance Release.
  • Fix: Removed duplicate country entries.
  • Improved: HTML to have W3C Standards Compliance!

  • Maintenance Release.

  • Bug Fix: CSS class for CSS Sprite was an attribute instead of it being a class its fixed now.

  • Improved W3C compliance removed nowrap attribute on td tag.

  • Maintenance Release.

  • Maintenance Release.

  • Added CSS Sprite support to save the overhead of having to fetch multiple flag images.

  • Changed label names to avoid confusion.


  • Tested compatibility with WordPress Version 3.3.1.

  • Maintenance Release.

  • Maintenance Release.
  • Bug Fix: Better plugin options saving.
  • Added facebook like button.

  • Maintenance Release.

  • Added alt attribute for images to meet w3c validation standards

  • Removed table-column align attribute and added CSS for column text alignment (Not a bug but few have their theme CSS alignment for table and this will override it). (Thanks for sharing the issue Morten)

  • Maintenance Release.

  • Bug Fix Release: A quick bug fix release, thanks for reporting Nico, could’t use Settings option through the plugin page (deactivate / settings / edit) except from regular Settings – Google Analytics Visits menu on the lefthand of the dashboard. The plugin page gives an ‘Unautohorized to view this page’ error. now Fixed.

  • Bug Fix: Problem on WP versions less than 3.1.0 Fixed! (Thanks to Maria Snyder and Mehul for reporting).
  • Tested with WordPress 3.1.2

  • A possible bug fix (thanks for informing nivosh).

  • Some enhancements.

  • Some enhancements.
  • Tested with WordPress 3.1.1

  • NEW: Exclude “(not set)” country, its pageviews and its visits (on Jonathan request).
  • The numbers are aligned to right instead of left (on Jonathan request).
  • Other enhancements: options saved/updated notification and more.

  • NEW: Added new flags for “Congo [DRC]” (on Placido request), “Isle of Man” and Jersey.
  • Tested with WP 3.1 and works fine.

  • Maintenance Release.

  • NEW: Added debug reporting on Arturo request.

  • Maintenance Release.
  • Tested with WP 3.0 and works fine.

  • Maintenance Release.

  • NEW: Option to define the number of days you want the analytics visits for! E.g. Visits from last 30 days.
  • NEW: Added support to have custom header text.
  • BUG FIX: Displaying “Total Pageviews” was removed since by mistake and now its back.

  • NEW: Added error reporting for invalid values in Profile ID.
  • FIX: Better alignment for Flags, Countries, Visits and Pageviews.

  • BUG FIX: A minor bug fixed. (Thanks Bart for reporting)

  • BUG FIX: The plugin interfered with the WordPress flash and browser image uploaders. This has been fixed. (Thanks George for reporting)

  • NEW: Added Option to display Visits with No Percentage.
  • NEW: Added Option to display Pageviews with No Percentage.

  • Added Flag for Reunion.

  • Added show or hide Total Countries (Thanks Tudorminator for pointing that out).
  • Added ‘Error Handling’ for user authentication and Profile ID (again on Tudorminator’s request)

  • Added Flag for Mongolia.

  • Some fixes.

  • Some fixes as reported by Jim/Josh ( Thanks Jim/Josh ).

  • Some fixes.


  • NEW: Added more options like displaying percentage values or actual values of visits and pageviews.
  • NEW: Added new flags.
  • NEW: Added an option to hide header ( Flags Country… ).


  • NEW: Added Country Flags.
  • NEW: Added Option to display Country Names or Flags or Both.
  • NEW: Added Visits and Pageviews actual count with percentages.


  • NEW: Auto-clear cache when new settings are saved.


  • NEW: Cache support – added cache feature to lessen the load on google analytics and inturn page loading of wordpress page, where the widget is placed, will be faster.
  • NEW: If Cache Enabled, Cache Expires in — Minutes.
  • NEW: You can choose to display Visits or not.
  • NEW: You can choose to display Total Visits or not.
  • NEW: You can choose to display Pageviews or not.
  • NEW: You can choose to display Total Pageviews or not.


  • First release.