Counterize plugin for WordPress

Counterize banner

Counterize plugin for WordPress

Introduction

Counterize is a counter and statistics plugin for WordPress that doesn’t use external libraries. Download Counterize!

Notice

There has been some reports that Counterize does not work well with WordPress 4.x currently. As we do not plan to update the plugin anytime soon, we advise to use another statistics plugin.

Features

  • Hourly, daily, weekly and monthly traffic stats
  • Popular pages and posts stats
  • IP addresses stats
  • Countries stats
  • Referrers stats
  • Accurate browsers stats (browser name and version)
  • Accurate operating system stats (operating system name, version and platform)
  • Keywords stats
  • Powerful history with filters let you find precisely what you’re looking for
  • Email reports
  • Integration in the WordPress toolbar
  • No flash, no external library needed
  • Extensible thanks to WordPress actions and filters
  • Dashboard widget for a quick overview of your blog statistics
  • Complete API to use the data of Counterize charts as you like
  • An administration interface using the new WordPress Settings API is available, as well as a dashboard with detailed informations and statistics
  • The users that are authorized to display the Counterize dashboard can be defined using WordPress capabilities
  • It can display statistics in your pages and posts (visit this webpage for a demo)

Version 3 of Counterize is doing its best to be compatible with the latest release of WordPress, but this is still a work-in-progress. Feel free to report any incompatibility! Also, please note that Counterize is only guaranteed to work correctly on the latest version of WordPress.

You are welcome to propose your translation for Counterize, please follow this guide. I am not a native English speaker, so your help for a better English translation would be appreciated as well.

Here is a very short demo of what Counterize can do:

[counterize type=”os” items=”3″ subitems=”5″ collapsible=”yes” header=”Top 3 operating systems”]

Counterize is a fork of Counterize II by Steffen Forkmann (http://www.navision-blog.de/counterize) who kindly gave us the permission to continue the development of his plugin. It has since evolved to a more complete and powerful plugin, and almost doesn’t share common code anymore.

Counterize API

After you have installed the Counterize plugin, you can see a lot of diagrams on the Counterize Dashboard page (Dashboard/Counterize).

Most likely you’d like to have a counter somewhere on your pages, showing the number of visitors or similar.
Here’s an overview of the functions which can be used anywhere in your WordPress blog:

Traffic functions

counterize_getamount()                 // Returns the total hits seen by Counterize.
counterize_getpagesamount()            // Returns the total pages/posts views.
counterize_gethitstoday()              // Returns the total hits registered today.
counterize_get_online_users()          // Returns the number of currently online users.
counterize_getlatest7days()            // Returns the total amount of hits from the last 7 days.
counterize_getuniqueamount()           // Returns the total unique IP's that's been seen.
counterize_getfromcurrentip()          // Returns the total hits from the IP that's visiting.
counterize_getuniquehitstoday()        // Returns the number of different IP's registered today.
counterize_gethitstodayfromcurrentip() // Returns the daily hits from the IP that's visiting.
counterize_current_post_hits()         // Get number of hits on current post/page.
counterize_return_first_hit()          // Returns the date of the first registered entry in the database.
$counterize_plugins['traffic']->counterize_get_hits()                     // Output an HTML table with statistics about hits.
$counterize_plugins['traffic']->counterize_feed_daily_stats()             // Get the daily stats data feed.
$counterize_plugins['traffic']->counterize_render_daily_stats()           // Render the daily stats data feed.
$counterize_plugins['traffic']->counterize_feed_monthly_stats()           // Get the monthly stats data feed.
$counterize_plugins['traffic']->counterize_render_monthly_stats()         // Render the monthly stats data feed.
$counterize_plugins['traffic']->counterize_feed_weekly_stats()            // Get the weekly stats data feed.
$counterize_plugins['traffic']->counterize_render_weekly_stats()          // Render the weekly stats data feed.
$counterize_plugins['traffic']->counterize_feed_week_progression_stats()  // Get the progression between the last current week stats data feed.
$counterize_plugins['traffic']->counterize_render_week_progression_stats()// Render the progression between the last current week stats data feed.
$counterize_plugins['traffic']->counterize_feed_hourly_stats()            // Get the hourly stats data feed.
$counterize_plugins['traffic']->counterize_render_hourly_stats()          // Render the hourly stats data feed.

Referrers functions

counterize_getuniquereferers()                                              // Returns the amount of unique referrers that have been recorded.
$counterize_plugins['referers']->counterize_feed_most_seen_referers()       // Gets the most seen referrers data feed.
$counterize_plugins['referers']->counterize_render_most_seen_referers()     // Renders the most seen referrers data feed.
$counterize_plugins['referers']->counterize_feed_most_seen_referers24hrs()  // Gets the most seen referrers data feed for the last 24 hours.
$counterize_plugins['referers']->counterize_render_most_seen_referers24hrs()// Renders the most seen referrers data feed for the last 24 hours.

Pages and Posts functions

counterize_getuniqueURL()                                                 // Returns the amount of unique URL's that have been shown.
$counterize_plugins['pages']->counterize_feed_most_requested_urls()       // Gets the most requested URLs data feed.
$counterize_plugins['pages']->counterize_render_most_requested_urls()     // Renders the most requested URLs data feed.
$counterize_plugins['pages']->counterize_feed_most_requested_urls24hrs()  // Gets the most requested URLs data feed for the last 24 hours.
$counterize_plugins['pages']->counterize_render_most_requested_urls24hrs()// Renders the most requested URLs data feed for the last 24 hours.
$counterize_plugins['pages']->counterize_feed_most_popular_posts()        // Gets the most popular posts/pages data feed.
$counterize_plugins['pages']->counterize_render_most_popular_posts()      // Renders the most popular posts/pages data feed.
$counterize_plugins['pages']->counterize_feed_most_popular_posts24hrs()   // Gets the most popular posts/pages data feed for the last 24 hours.
$counterize_plugins['pages']->counterize_render_most_popular_posts24hrs() // Renders the most popular posts/pages data feed for the last 24 hours.

IP addresses functions

$counterize_plugins['ip']->counterize_feed_most_active_ips()       // Gets the most active IP addresses data feed.
$counterize_plugins['ip']->counterize_render_most_active_ips()     // Renders the most active IP addresses data feed.
$counterize_plugins['ip']->counterize_feed_most_active_ips24hrs()  // Gets the most active IP addresses data feed of the last 24 hours.
$counterize_plugins['ip']->counterize_render_most_active_ips24hrs()// Renders the most active IP addresses data feed of the last 24 hours.

Keywords functions

$counterize_plugins['keywords']->counterize_feed_most_searched_keywords()       // Gets the most searched keywords data feed.
$counterize_plugins['keywords']->counterize_render_most_searched_keywords()     // Renders the most searched keywords data feed.
$counterize_plugins['keywords']->counterize_feed_most_searched_keywords24hrs()  // Gets the most searched keywords data feed for the last 24 hours.
$counterize_plugins['keywords']->counterize_render_most_searched_keywords24hrs()// Renders the most searched keywords data feed for the last 24 hours.

Countries functions

$counterize_plugins['keywords']->counterize_feed_most_visiting_countries()       // Gets the most visiting countries data feed.
$counterize_plugins['keywords']->counterize_render_most_visiting_countries()     // Renders the most visiting countries data feed.
$counterize_plugins['keywords']->counterize_feed_most_visiting_countries24hrs()  // Gets the most visiting countries data feed for the last 24 hours.
$counterize_plugins['keywords']->counterize_render_most_visiting_countries24hrs()// Renders the most visiting countries data feed for the last 24 hours.

Browsers functions

counterize_getuniquebrowsers()                                                         // Returns the amount of unique browser strings that have visited your blog.
$counterize_plugins['browsers']->counterize_feed_most_used_browsers_collapsible()      // Gets the most used browsers data feed with detailed version statistics for each item.
$counterize_plugins['browsers']->counterize_render_most_used_browsers_collapsible()    // Renders the most used browsers data feed with detailed version statistics for each item.
$counterize_plugins['browsers']->counterize_feed_most_used_browsers_without_version()  // Gets the most used browsers without version data feed.
$counterize_plugins['browsers']->counterize_render_most_used_browsers_without_version()// Renders the most used browsers without version data feed.
$counterize_plugins['browsers']->counterize_feed_most_used_browsers()                  // Gets the most used browsers data feed.
$counterize_plugins['browsers']->counterize_render_most_used_browsers()                // Renders the most used browsers data feed.

Operating systems functions

$counterize_plugins['os']->counterize_feed_most_used_os_collapsible()      // Gets the most used os data feed with detailed version statistics for each item.
$counterize_plugins['os']->counterize_render_most_used_os_collapsible()    // Renders the most used os data feed with detailed version statistics for each item.
$counterize_plugins['os']->counterize_feed_most_used_os_without_version()  // Gets the most used os without version data feed.
$counterize_plugins['os']->counterize_render_most_used_os_without_version()// Renders the most used os without version data feed.
$counterize_plugins['os']->counterize_feed_most_used_os()                  // Gets the most used os data feed.
$counterize_plugins['os']->counterize_render_most_used_os()                // Renders the most used os data feed.

Actions

  • counterize_show_data : Let plugins show their data into the “Counterize” sub-menu page.
  • counterize_after_includes : Happens right after Counterize included its files.
  • counterize_before_insert_into_database: Let plugins do something just before some data is inserted into the database.
  • counterize_after_insert_into_database : Let plugins do something just after some data is inserted into the database.
  • counterize_init : Let plugins add a hook into Counterize initialization procedure.
  • counterize_before_install : Let plugins do something just before installation.
  • counterize_after_install : Let plugins do something just after installation.

Filters

  • counterize_before_includes : Let plugins filter which files are included.
  • counterize_server_remote_addr : Let plugins filter the $_SERVER[‘REMOTE_ADDR’] value.
  • counterize_server_http_user_agent : Let plugins filter the $_SERVER[‘HTTP_USER_AGENT’] value.
  • counterize_server_request_uri : Let plugins filter the $_SERVER[‘REQUEST_URI’] value.
  • counterize_server_referer : Let plugins filter the $_SERVER[‘HTTP_REFERER’] value.
  • counterize_server_this_url : Let plugins filter the $this_url variable.
  • counterize_bot_array : Let plugins filter the bot array.
  • counterize_check_insert_into_database : Let plugins add their own conditions for determining if data should be inserted into the database.
  • counterize_check_data : let plugins add their own diagrams.
  • counterize_shortcodes : let plugins add their own shortcodes.
  • counterize_dashboard_add_submenu : let plugins add their own sub menu.
  • counterize_mce_js_before_form_filter : let plugins output something before the form of the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_before_fields_filter: let plugins output something before the fields of the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_type_filter : let plugins add more type items in the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_period_filter : let plugins add more period items the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_after_fields_filter : let plugins output something after the fields of the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_after_form_filter : let plugins output something after the form of the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_options_filter : let plugins add/modify attributes and their defaults for the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_radiobutton_filter : let plugins add/modify the list of attributes of type “radio button” for the Counterize modal dialog in the Visual editor.
  • counterize_mce_js_checkbox_filter : let plugins add/modify the list of attributes of type “checkbox” for the Counterize modal dialog in the Visual editor.
  • counterize_report : let plugins output some content in the email reports
  • counterize_report_what_filter : let plugins add some items in the list used to generate email reports

Shortcodes

You can insert a Counterize diagram using the Counterize button in your Visual editor. The most basic shortcode is:

[[counterize]]

This will display a short copyright notice.

All the attributes are optional. The following attributes and their values are currently available:

  • type: String. Valid values are:
    • copyright“: Shows a copyright notice (default value)
    • browsers“: Browsers diagrams
    • os“: Operating systems diagrams
    • countries“: Countries diagrams
    • ip“: IP addresses diagrams
    • hosts“: Host-names diagrams (only available if enabled in the settings)
    • outlinks“: Out-links diagrams
    • exitpages“: Exit pages diagrams
    • keywords“: Keywords diagrams
    • referers“: Referrers diagrams
    • domains“: Domains diagrams
    • hits“: Hits table
    • hourly“: Hourly stats diagrams
    • daily“: Daily stats diagrams
    • weekly“: Weekly stats diagrams
    • monthly“: Monthly stats diagrams
    • all“: All tables and diagrams
  • items: Positive and non-zero integer that represents the number of items to display in the diagram. Default value: 10
  • subitems: Positive and non-zero integer that represents the number of sub-items to display in the diagram. Only effective with collapsible diagrams. Default value: 15
  • version: String. Set to “yes” to display diagrams with version information, “no” otherwise. Only effective with Browsers and OS diagrams. Default value: “yes”
  • collapsible: String. Set to “yes” to display collapsible diagrams with each item containing child items, “no” otherwise. Only effective with Browsers and OS diagrams. Default value: “no”
  • print_header: String. Set to “yes” to display a header above the diagram, “no” otherwise. Default value: “yes”
  • header: String. Set to non-empty string to override the default header. Default value: empty string
  • period: String. Valid values are:
    • (empty string): No period limit (default value)
    • 24h“: Limit data to the latest 24 hours. Available for most diagrams except the Traffic ones
    • onlytoday“: Limit data to today only. Available for Traffic diagrams
    • onlythisweek“: Limit data to this week only. Available for Traffic diagrams
    • onlythismonth“: Limit data to this month only. Available for Traffic diagrams
    • onlythisyear“: Limit data to this year only. Available for Traffic diagrams
  • tn_width: Positive and non-zero integer. Width of the post thumbnail. Default value: 50
  • tn_height: Positive and non-zero integer. Height of the post thumbnail. Default value: 50

Development status

Legend: [status, priority] Description

  • [wip, medium] Make a Counterize widget
  • [10%, low] Add some sorting options (by label for example)
  • [ 0%, medium] Get rid of pre-3.0.0 installation scripts
  • [ 0%, medium] A new installation should have its own installation script (currently upgrading from 1.0.0 to 3.x.x…)
  • [ 0%, low] To be able to resize and move charts in the dashboard (but I consider it not urgent)
  • [ 0%, low] Using the HighCharts library as an alternative fancier display
  • [ 0%, medium] Making a standalone version of Counterize. That would allow to port it to other platforms (Drupal, Magento…).
  • [ 0%, high] Allow wildcard characters support in IP address exclusion list
  • [ 0%, high] Solve time zones problems as many reported it
  • [ 0%, high] Reduce the Counterize footprint on database [BIG JOB AS ALL QUERIES MUST BE RE-WRITTEN]
  • [ 0%, medium] Send daily, weekly or monthly reports by email
  • [ 0%, medium] Better IP exclusion list handling
  • [ 0%, low] Add more function to count unique visitors, in a similar way as hits
  • [ 0%, high] Move some Counterize functions into their respective plugins
  • [ 0%, medium] Add screen size statistics

See Counterize in action

You can see Counterize in action in the bottom of our website pages, and also on this demo page.

FAQ

Q: I know that I have incoming traffic but  Counterize stats stay at zero. Why?

A: There is probably a problem somewhere, so I will need you to do the following:

  •  Open your wp-config.php file
  • Ensure that WP_DEBUG is set to true. The line should be “define( ‘WP_DEBUG’, false );”
  • Add the following lines just after:
error_reporting( E_ALL | E_STRICT );
ini_set('display_errors', 1);
  • Reload your website in your browser
  • Tell me about any errors, warnings and notices you see, if any
  • If no errors are shown, then you probably do not have incoming traffic…

Q: Why aren’t the IP of my visitors logged?

A: You need to enable the option in the Counterize settings. It is disabled by default. 

Q: How to translate Counterize in my language?

A: Please follow these instructions

Q: Can I extend Counterize?

A: Yes. Counterize is now modularizable and you can add your own Counterize plugin. Counterize also provides several action and filter hooks.

Q: Can Counterize replace Google Analytics?

A: Not yet. But it’s a good addition/alternative. 

Q: What are the minimum requirements to run Counterize?

A: The same requirements than the current stable version of WordPress, so for example PHP 5 is required, but as with each supplementary plugin, it will use more RAM, so take this into account.
Counterize is also known to take a lot of database space in its current version, especially if your website is very visited.

Q: I see an error message like “The script whose uid is 12345 is not allowed to access /var/tmp/” or “Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent“, HELP!

A: Try adding the following 3 lines just after the PHP start tag of your wp-config.php:

if( ! isset( $_SESSION ) )
{
	session_start();
}

Also, make sure the session.save_path in your php.ini is set and point to a valid path. Please read this article for more details about this issue.

Q: Do you provide support for Counterize?

A: Sometimes, I can provide BASIC support for free. It mostly depends on my free time, because Counterize is developed on my free time too.
Nobody likes to work for peanuts, so do not expect professional level support for free.
If you need a better support or something is urgent, please contact me to discuss of a price. 

Get Counterize

Download Counterize!

462 Responses

  1. terrah @ bits n' bytes says:

    Hi Gabriel,

    Thanks for all your hard work on this plugin. I am having a small problem and I was wondering if you could help me out – I am using the function counterize_current_post_hits() to display the number of hits for each post, inside the loop, in content.php, but the value returned is not the true number of hits for the post.

    Here is an example.

    For this page, with post id 166: http://bitsnbytesblog.com/?p=166 , the number of hits displayed on the post is 66.

    In my database there are the following rows:

    PageID  -  URL            -                COUNT -  POSTID
    3        /2011/06/dday-ical-c-library/     68       166
    61       /2011/06/dday-ical-c-library      5        166
    63       /?p=166                           7        166
    

    Based on this data, the true number of hits is 80.

    Any idea what might be causing this, or how I can work around it?

    Thanks again,
    Terrah

    • Subhash says:

      Look one comment before yours and you find the soluren. The problem is that counterize looks only for the first url and if you have sometimes query strings or anchors in your urls the count is just for the first.

  2. terrah @ bits n' bytes says:

    Subhash,

    Thank you for doing the legwork to find the problem. This can actually be solved in a simpler and more efficient way, by changing the following SQL line:

    $sql = "SELECT `count` "

    to

    $sql = "SELECT SUM(`count`) "

    and leaving the rest of the function as it was. Then you do not need to loop through and manually count the results with the while-loop. I updated this on my site and it is working perfectly.

    Thanks again,
    terrah

  3. Nasko says:

    I have translation for Bulgarian. Do you want it? Give me some e-mail.

  4. Tomi says:

    I am using “webcomic” which is a thme for wordpress made for webcomics, and the counter doesn’t show up when i activate the plugin 🙁

    • Well, Counterize does not show any counter by itself ; you will have to insert a function in the php code of your theme, for example in your footer you could insert the following function:

      echo counterize_current_post_hits();
      • John Ogbourne says:

        I am having a similar proble, have tried the code in several formats, ie.

        echo counterize_get_online_users()

        but none show anything other than the 2nd which prints the code.
        Does it make any difference that I am using my own hosting, not wordpress?

        • John Ogbourne says:

          Just realised that one of my codes didn’t appear in my message, which commences

          <?php echo

        • Hi John,

          As I said previously, Counterize currently doesn’t show any counter by itself (only charts). You will need to be able to edit your theme and add the following PHP code for example :

          <?php echo counterize_current_post_hits(); ?>

          In future releases, it will be possible to insert counters in pages and posts using the [counterize] shortcode, without typing PHP code.

          It is actually easier if you use your own hosting as you do not have the limitations of WordPress.com blogs.

  5. janvehrenkamp says:

    Hi!
    I was just wondering, if there’s an option to track the unique visitors in the same way as the hits(daily/weekly/monthly), instead or in addition to hits.
    Hits are not as interesting as unique visitors.
    Thanks!

  6. jankete says:

    Is there any api-code to get the unique IPs for yesterday (like this is for today: counterize_getuniquehitstoday)

  7. Emmanuel Chanel says:

    Hello! I’ve found zero counts for days on Counterize 3.0.33 on my blogs with WordPress 3.3.
    http://www.emmanuelc.yuuna.org/
    http://www.emmanuelc.yuuna.org/ja/
    The Dashboards says “There’s no data in the database – You can’t see stats until you have data.”.
    I use the multisite function of WordPress. So dosn’t Counterize work in such environment?
    Hhm… it looks that the same problem appears on the single site environments…

    • It has already been reported that Counterize does not work in multisite version of WordPress. This is probably just a few lines to change/add in the code, but I haven’t give a look at it yet. That is something in the TODO list though 🙂

      • Dominik says:

        Counterize works great in multisite – you just have to enable it manually for each blog, not as a “global” plugin.

        The problem is that counterize uses its own database table for each blog and that table is created when the plugin is enabled. If the plugin is globally enabled for the whole multisite environment this install step is not executed for each blog – and that’s why no table exists.

  8. Robert says:

    I see the filters section.

    But I’m wondering how to keep out of statistics the bots.

    I mean, it is provided the bots.txt, but I’m checking the most seen visitor’s IP and clicking the whois link I see that the top three are

    91 visits 66.249.71.182  google bot
    24 visits 65.52.110.22   msn
    14 visits 207.46.195.239 msn
    

    on 500 visits (in two days) it is quite much.

    Very early counterize 0.5xx (made by the original developer) was providing a section for IPs to keep out of statistics.

    In that section I added each of the bots’ IPs.

    Is it possible to do the same with Counterize 3.xx ?
    If not, it would be a nice enhancement to add to Counterize.

    Anyway, thank you so much for this plugin, it is really really impressive, especially for the graphics and the arrangement.

    Thank you for any reply

    Robert

    • Hi Robert,

      Did you check “Enable bots logging” in the Settings > Counterize section of your Dashboard? If yes, try to uncheck it, it should get rid of the bots for all the future stats (you will have to delete the old ones manually).

  9. Tara says:

    Love this plugin. thanks for all of the hardwork!
    One question: Is it possible to exclude by IP range in addition to individual IPs? I want to exclude an entire corporate network.
    Thanks!

  10. Simon Castillo says:

    Hello, good plugin. My question is if the hour zone used in reports is UTC or the hour zone adjusted in the blog.

    Thank You

    Simon Castillo

    • Hi Simon,

      The time zone used should be the server one as I do not specify any. Time zones aren’t well supported on the current version of Counterize, but I’m planning to work on it.

  11. Gman says:

    Have recently switched from counterized to counterizedII because I thought I may have screwed settings up. I am fairly new to working my own website “9 months podcast network” and may be over my head with this counter. I may have a few hundred unique visitors on a given day but my counter will tell me I have thousands of hits. Below is the culprit line that keeps repeating at different hours of the day. 542 2011-12-31 13:27:05 /crossdomain.xml (F) unknown Internet ExplorerInternet Explorer 8.0
    Windows Windows 7 64 bit I will hope this is enough info for some advise, Thanks,Gman

    • Hi Gman,

      Having thousands of hits is normal with hundreds of visitors, hits and visits are a different thing.

      However you can edit the file “botlist.txt” and add a line to block this specific visitor. A “complexfilter” line could do the trick. Please refer to the Counterize readme.txt to know more about complex filters.

  12. marco says:

    ciao il mio per 10 giorni è andato bene domenica ho visto calare a picco le visite e mi ha stupito ho installato wassup wp e mi dà visite giuste media 755 ogni or,cosa può essere acaduto?

  13. Szépe Viktor says:

    Hello!
    When upgrading to 3.1 I get this error:
    PHP Fatal error: Call to undefined function counterize_countries() in /home/nemethz/public_html/wp-content/plugins/counterize/counterize_install.php on line 862, referer: http://www.prezimagyarul.hu/wp-admin/update.php?action=install-plugin&plugin=counterize&_wpnonce=6be1bda920

    And Yes, the function counterize_countries in not defined.

    • Hi, I just uploaded the fix, very sorry for that! You can grab the updated counterize_install.php file from the ZIP in the WordPress website or from my website.

      Or you can replace manually “counterize_countries()” by “counterize_countryTable()”

  14. Bob21 says:

    I just updated my counterize. All of my stats history in the dashboard are now gone? How can I bring my history back? Help!

    Bob.

  15. marion says:

    I don’t know if I was hit by a bug or not, but I updated my Counterize plug in as directed and now all the number stats are gone and the dashboard page is not the same. The hourly stats, the daily stats, etc are all gone. I have already lost stats with my old plug in, which was used by others to spam me, so I don’t want to start another counter. Should I be patient and wait for the page to update or dump this plug in and search for another

  16. Nova says:

    Hi, I’m having a really weird experience with your upgrade. I’ve only just done the upgrade and straight away I get the error “Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/28/7418528/html/wp-content/plugins/counterize/counterize.php:30) in /home/content/28/7418528/html/wp-content/plugins/counterize/counterize.php on line 30” many times across the top of my page.

    All the individual plugins appear but it says I have version 1.0 and gives me the option to upgrade each individual plugin to 3.1.0, which I’ve done 3 times, and each time it says upgraded successfully, but I still have the header errors and my dashboard still says each plugin is on v.1.0 and asks me to upgrade to 3.1.0.

    The header errors disappear when I deactivate the plugin.

    Just noticed another error message… I currently have only Counterize activated and my plugin manager is displaying the message:
    “The plugin generated 336 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

    Please sort this out soon, I really like Counterize.

    Thanks.

    • Hi Nova,

      It means that something – Counterize or another plugin – started to output data. It is usually fixed by removing any blank line and trailing spaces in PHP files. Counterize doesn’t have trailing spaces and blank lines outside its PHP tags, but check if it helps to move the following code before the security check, near line 14 of counterize.php:

      if( ! isset( $_SESSION ) )
      {
      	session_start();
      }

      If it doesn’t help, then try to disable any other plugin and see if the errors are still there. If the errors are gone, you will have to check which plugin causes that. It is also possible that your theme is causing this.

      Let me know if it helps.

    • Actually moving those 3 lines to the top of your wp-config.php might get rid if the error. Could you try and tell me if it change anything?

  17. jose luis says:

    Hi Gabriel, just update “counterize” and I find that statistics are only “by country” all others have disappeared and can not find a way to recover. Can you help? a greeting

  18. Wyatt Leedy says:

    The new version of Counterize doesn’t show the only thing I care about – the number of people viewing my site each day. I’m not technically savvy so it’s probably just a matter of switching a setting but I couldn’t figure it out. How do I see the bar graph representation of hits instead of a list of entries for every single user?

  19. John Clemt says:

    I just upgraded and this plugin has slight screwed up my blog and the plugin is unusable.

    Its spitting out the following on every page and mentioned sending an unexpected amount of data.

    A shame as this plugin was great – what was the reason i splitting one module into seven seperate modules as I find it harder to manage.

    (edit by administrator: use a pastebin for lengthy content)

  20. Nova says:

    I just tried deleting it all together and reinstalling from scratch – same problem 🙁

  21. The update 3.1.1 should be available today and will correct most of the reported problems. Thank you for your patience, I’m on a slow 56k modem connection.

  22. Subhash says:

    The new version destructed my layout. it seems that “counterize_feed_most_popular_posts(5)” does not work any more. Markup validation reported “End of file seen and there were open elements”. When I comment this out, everything is fine again, but I cannot display the 5 most popular posts any more. I tried “$counterize_plugins[‘pages’]->counterize_feed_most_popular_posts(5)” and “$counterize_plugins[‘pages’]->counterize_render_most_popular_posts(5)” but this doesn’t work either. Do you have a hint?

    • Subhash says:

      I forgot: Counterize version 3.1.1

    • Hi Subhash,

      Sorry for the trouble. You should definitely use:

      $counterize_plugins['pages']->counterize_render_most_popular_posts( 5 );

      It may be necessary to place the following line before:

      global $counterize_plugins;

      Let me know if it helps !

      • Subhash says:
        global $counterize_plugins;

        was necessary. I use now

        $feed = $counterize_plugins['pages']->counterize_feed_most_popular_posts(5);

        because I want to be able to work with only the elements of the feed I need and format it as I like which works now again.

        Thank you for the very quick support.

  23. Nova says:

    Thanks for the reply and for the update. I have installed 3.1.1 and am still getting the same error messages across the top of my page (front-end and admin):

    Warning: session_start() [function.session-start]: open(/var/chroot/home/content/28/7418528/tmp/sess_ht57que4sro39qhvde93mg76g3, O_RDWR) failed: No such file or directory (2) in /home/content/28/7418528/html/wp-content/plugins/counterize/counterize.php on line 16

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/28/7418528/html/wp-content/plugins/counterize/counterize.php:16) in /home/content/28/7418528/html/wp-content/plugins/counterize/counterize.php on line 16

    I’m running WP 3.3.1 with the twenty-eleven theme, and I only get this error when I activate the Counterize plugin, the moment I deactivate it there’s no problem. I also had no problems at all with Counterize before yesterday’s update. My blog is only two weeks old so my plugin collection is fairly minimal and this is the first time I’ve seen these errors.

  24. Simón Castillo says:

    Couterize updates on January 18 and 19 seem to be downgrades instead updates.
    Reconsider this.

  25. Ribice says:

    Hey there,

    I really like your plugin, but the latest version (3.1.2) is just … meh.

    Well I don’t like the thing that it just takes too much space in Plugins menu (8 actually). Is there any way you can make it 1 again?

    Regards

    • Hi,

      Thank you for your interest in Counterize.
      It is impossible to do that at present, but in the future I may propose a all-in-one plugin. I just need to find how. Probably, copying and pasting the content of each plugin at the end of the counterize.php file could do, but I would not be surprised if it doesn’t work. If you have an idea, or better, a solution, please let me know.

      All the best,

      Gabriel

  26. Pedro says:

    Mi consulta es la siguiente, como puedo contabilizar click en los banners que tengo en mi sitio, tengo instalado WP Bannerize y Banners, pero me da una estadistica solo acumulativa ¿habrá alguna configuración que se pueda hacer.

    • Hi Pedro,

      I’m not sure to understand your question. Do you want to count how many users clicked on your banner, or do you want to display in the banner how many users visited your website?

  27. Peter says:

    Hi,
    I see so many stats and graphs options, but all i want is an overview graph with traffic counted by date, including the dates: so for example the last 10 days (with day/date of course) and I cannot find it while almost every other counter has this. Did I overlooked something?

    • Hi Peter,

      In the Traffic section, there is a graph named “Hits for the last 7 days” that seems to do what you want, but for the last 7 days :).

      Or were you speaking about bandwidth usage?

      Also, do not hesitate to tell me what graphs are missing in Counterize, I may add your suggestions to the TODO list and develop the graphs in a next release of Counterize. The goal being to create the most complete plugin possible and of course satisfy Counterize users 🙂

      • Peter says:

        Hi Gabriel,
        Thanks for your fast reply! I see them for hits, but not for uniques (unique visitors/day). Besides that Counterize rocks, its realy gives great extensive usefull information 🙂

  28. Matt says:

    I just switched to the new Counterize 3.1.2. and I use Google Chrome. It seems after updating to C3.1.2., activating the individual plugins are not out of the order in which I had them. Example: I had the Traffic at the top, then popular posts, referrals, etc.. Now I can’t get them back in that order for the life of me. What’s the deal, yo?

    • Hi Matt,

      Yes the order of the menu items has changed since the plugin system has been enabled. It is currently impossible to define an arbitrary order in v3.1.2, but I will find a way for future releases, because it bothers me too. Thank you for your interest in Counterize!

  29. Rocco says:

    This plugin is great…. I have one question.. How do I activate/create a widget for my home page for this plugin??? Thank you in advance…

  30. Subhash says:

    I wonder why Counterize shows let’s say 70 „Seitenansichten” (pages?) and 110 „eindeutige Besucher” (visits?). That means 40 people have not seen anything but visited may blog? How is this possible?

    • Hi Subhash, nice to see you again 🙂

      It is possible, for example if someone (or something) searches something in your website, displays posts by categories or by tags, then this will not be counted as posts and pages views.

      • Subhash says:

        Thank you for the information! A glossary would be fine.

        Another suggestion:
        I would like to have checkboxes for every section of the Counterize Dashboard so I can display this information (and send the requests to the DB) or not. I do not like the solution now with so many plugins and so many pages. Before there was only one Counterize plugin, now there are ten!

        And: I understand that you don’t like Paypal but I do not want to subscribe to another service. I wanted to donate but …

        • Hi Subhash,

          The plugin solution is not definitive, but it is currently the most convenient way to add plugin functionnality to another plugin, and besides having ten plugins in the plugins section instead of one, it does not bother me too much. Or were you talking about the different Counterize pages in its menu?

          About Paypal, I will not come back to it. What’s important is not the money, it’s the willing. So thank you the same. 🙂

          • LD says:

            I have just discovered this plugin and if it works as stated I think it rocks!

            But I would rather have ONE single plugin with checkboxes to enable functionality than 10 different sub-plugins.

            Is there a change planned or will this stay this way?

  31. Andreas Köhler says:

    Hi,
    since I have started my blog in decembre last year I´m using “counterize”. First of all I wanna say that it´s pretty cool to have this tool on board and seeing the hits increasing.
    But what is the difference between “hits” and “unique”? My hits are almost 5k but unique are only 967. How do I have to understand this?

    Regards!
    Andreas
    http://www.einfach-andreas.de

    • Hi there!

      Everything is explained in the “Help” link on top right of Counterize pages 😉

      (or tell me if you do not have this “Help” tab)

      • Andreas Köhler says:

        Hi,
        hm, somehow I can´t find it. Am I blind?

        • No, you probably do not have WordPress 3.3.0 or newer.
          So here is what I wrote in this help section:

          * Hits: A hit is counted each time a ressource is fetched. The resource is not necessarily an existing page or post.
          * Pages views: A page view is counted each time a hit concerns a valid page or post.
          * Unique visitors: A unique visitor is counted only the first time its IP is recorded.
          * Unique visitors ‪(1h interval)‬: A visit will be counted again each time two or more hits from the same visitor are separated of more than 1 hour.
          * Unique visitors ‪(30 min interval)‬: A visit will be counted again each time two or more hits from the same visitor are separated of more than 30 minutes.
          * Hits per unique visitor‬: The number of hits per unique visitor.
          * Pages per unique visitor: The number of pages/posts visited per unique visitor.

          Hope this is more clear 🙂

          • Andreas Köhler says:

            Hi Gabriel,

            thank you for your explaination. My wordpress version is 3.3.1 but the help button you´ve mentioned I can´t find, only on dashboard. But at dashboard help button I don´t get help for counterize.

            With a “resource” you mean a backlink? So a counted hit is not necessarily a human visitor?

        • Here is a screenshot to help you locating that Help button (it is visible since WordPress 3.3.0 if I remember well):
          http://www.dump-it.fr/screenshotpng/4f2b824c8a81a1296e97f783cc5265d0.png.html

          Additionally, hovering each header of the Traffic table should display a popup with similar explanations.

          By “resource” I mean any attempt to fetch a page (existing or not), any file (CSS, JS, pictures, etc), etc.

          Although Counterize provides a botlist.txt file that ought to be as complete as possible (and does a pretty good job at blocking bots), I cannot guarantee that hits are 100% made by humans. There are so many bots on the Internet, and the botlist.txt file is made from the bots I find myself.

          If you want to exclude more bots, you can use the History to find them. Bots usually do not specify the referer, and they often use malformed user-agents that Counterize will recognize as “unknown” (make a filter for “unknown” user-agents, you should find quite a lot of strange user-agents… That’s bots 😉 ).

          Hope this helps ! 🙂

  32. Walenty says:

    I’m running WP 3.3.1 with the twenty-eleven theme and my blog was crashed with this plugin. I have the last version of the plugin. I get this error: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40 bytes) in /customers/satellitkarta.se/satellitkarta.se/httpd.www/blogg/wp-includes/capabilities.php on line 860
    Please help me

    • Hi Walenti,

      Your server ran out of the allowed memory. If possible, try to increase the memory. If you do not know how, please read this article: http://www.teknobites.com/2007/04/27/how-to-edit-phpini-file-to-increase-memory-limit/ (your memory limit is currently 32M, try to increase it to 48M or 64M if possible).

      If you cannot increase the memory, then I’m afraid that Counterize cannot run on your configuration. But I’ll show you how to restore access to your blog.

      You probably cannot access your blog anymore at that time, so try the following: login to your FTP, go to your wp-content/plugins/ directory, and delete the counterize directory. It may take a little while as there are hundreds of files to delete (if you have SSH access, you could speed up the deletion). Then, login to you PHPMyAdmin and remove the Counterize tables.

      By doing this, your blog will be restored as it was before you installed Counterize.

      Very sorry for the trouble!

  33. Rachael says:

    I’m running the latest version of WordPress and have come across (a handful of times) seeing the Hit Counter show zero for the entire day across every column?? I’m not sure why this is happening. I’ve also compared the Counterize stats against Google analytics and they are showing different numbers. Why would that be? Thanks for any help.
    Rachael

    • Hi Rachael,

      I also don’t know why the hit counter stays at zero for a whole day, never happened to me. Are you sure it happens for a whole day, not just a few hours? I guess that it is related to the known time-zone issue.

      Counterize will always have different statistics than Google Analytics, because Counterize filters a lot of bots in its statistics (so you are likely to find more visits in Google Analytics than in Counterize), and also there are certainly some bugs out there that I do not know about.

      Thank you for your interest in Counterize! 🙂

      • Rachael says:

        Would it zero out every column under “today” for just a couple hours? I would think it would just zero out one specific item (like “unique visitors”) It’s just done it now again. However I did look at it again this morning and it did show stats. Good to know why Counterize is different from Google Analytics. Ironically, the counterize stats are higher than google’s?

        • Well, it’s not very clear how Google count visits. Maybe they just count visits by user-agents in an internal white-list. I do not know how they count visits, and they would probably not tell me it if I asked them…

          Your issue is clearly related to time-zone issue. Unfortunately there is currently no way to correct that unless if you can change the server time to your local time. This issue is ranked with high priority in the TODO list of Counterize, but I have yet to fix all the queries, and can’t give an ETA. Just keep in mind that working on it is my priority for Counterize ;).

  34. Charles Macy says:

    I have been using Counterize for some time now, and like it very much, better than Google.
    It would please me to send you money as a token of my appreciation, but do not like any of the methods you have indicated.
    I’m 84 years of age and kind of set in my ways, but if you don’t mind giving me a physical address I will send you cash.
    Besides answering to this email address, you could use the Q&A section of my blog for that purpose. That is not a requirement, but if you do; you will be the first one to use it.
    That would be fun for me, and as a bonus, you might like what I have written about running a small retail business in this country.
    If you do, it is http://talkingretail.org

  35. Shilpan says:

    Gabriel,
    I love this plugin,but I’ve noticed that the pageviews on counterize is not matching with what I see in my Goole Analytics. I am averaging over 200 pageviews on counterize whereas Google analytics shows only 70 pageviews. How that happens?

    • Hi Shilpan,

      It is unknown how Google Analytics counts visits. The difference can be caused for example by:

      – Google Analytics uses JavaScript to load itself. So it just counts visits if and only if the browser loaded the GA Javascript file AND executed it successfully (JS supported, no connection timed out…). Being server-side, Counterize doesn’t require JavaScript to count visits, except for outlinks statistics.

      – Google Analytics probably discard visits of browsers it doesn’t support, plus they probably have a huge bot exclude list. Counterize only excludes the visits that match the botlist.txt file and/or the visits having their IP filtered.

      There are probably many other reasons, the way Google Analytics track visits is like a black box. I believe that Counterize stats are more accurate than Google’s.

      Hope this helps ! 🙂

  36. Tiago says:

    Hi, Gabriel!

    The Counterize plugin is already installed on my WordPress, but is not working.

    I downloaded the plugin from the wordpress page.

    Can you help me with that? I don’t know what is happening…

    Thank you,

    Tiago.

    • Hi Tiago,

      Sorry for the delay.
      What do you mean by “it’s not working”? Is it installed? Did you activated all the Counterize plugins in the Plugins section of your Dashboard?

      Let me know if I can be of any help.

  37. Michael says:

    I’ve been using Counterize and have been very pleased with it… My webiste was slugish so I decided to deactivate Counterize to see if the website speed improved. When I did so, some of my pages no longer load. But when I re-activate Counterize the pages load fine. The pages are MAPS and the message I am getting is that “maybe javascript is disabled”. That is the only clue given, other than the activate/deactivation of Counterize.
    I know this seems like a weird issue but I need to be able to temporarily deactivate Counterize and still have my MAPS working…
    What is your advice?

    • Hi Michael,

      That’s indeed a weird issue. Counterize shouldn’t influence the loading of pages when deactivated. What is MAPS exactly? Is it a WordPress plugin?

      Sorry for the trouble, and waiting for your reply 🙂

      • Michael says:

        I am using two MAP plugins, WP GEO Maps & Basic Google Maps Placemarks. Both plugins stop working when I deactivate Counterize. Also, the menu at the top of the window that includes the “Dashboard” dropdown also goes away when I deactivate Counterize. Since this is such a strange issue I am lost at what to do…
        Let me know what I can do to provide you additional information on this strange issue…
        -Michael

  38. Michael says:

    Gabriel, I replied to your reply on 3/15 and haven’t seen a reply from you… so.. I decided to create a new entry just in case that is how you get notified.
    I am using two MAP plugins, WP GEO Maps & Basic Google Maps Placemarks. Both plugins stop working when I deactivate Counterize. Also, the menu at the top of the window that includes the “Dashboard” dropdown also goes away when I deactivate Counterize. Since this is such a strange issue I am lost at what to do…
    Let me know what I can do to provide you additional information on this strange issue…
    -Michael

    • Hi Michael,

      Sorry for the delay. I’m currently sick, I ate some bad food I think, and it’s difficult to stand up these days. Hope you don’t mind a little more delay, I am currently unable to think straight.

      All the best,

      Gabriel

      • Michael says:

        No problem Gabriel… thanks for letting me know the reason behind the delay. This is my first time at using this medium to contact someone and wasn’t sure of the proper method to respond. Take you time and get well, I am in no hurry…
        Best Regards,
        Michael

      • Michael says:

        Hope you are feeling better Gabriel. I have tried a few things on my end to resolve the issue but I am still having the same problem. When I deactivate Counterize my map plugins stop working and so do the drop-down WP menus (includes “dashboard”). what do you suggest I try to identify the problem?

        • Hi Michael,

          Thank you, I’m feeling a little better now.

          I really don’t see how deactivating Counterize could prevent another unrelated plugin to work.

          Is there any error message? Or a blank page is shown?

          I suggest that you set WP_DEBUG to true in your wp-config.php, and add a few lines. It should look like this:

          define('WP_DEBUG', true);
          error_reporting( E_ALL | E_STRICT );
          ini_set('display_errors', 1);

          This should eventually display some errors and warnings, and could lead to find the cause and the solution to your problem 🙂

  39. Dominik says:

    I just installed your plugin yesterday and am now testing it on my blogs.

    Just 2 questions/annotations:

    a) You should minimize the JavaScript-File.
    b) Is there anything special I need to do to track outgoing links?

    • Hi again,

      a) Yes, good idea, that would definitely speed up load time as I like to format my code properly and this adds a lot of extra unused characters.
      b) You should be ready to go by enabling the “Outlinks” plugin for Counterize (it should appear in the Plugins section of your Dashboard). Note that it can only track outgoing links if JavaScript is enabled of course. By the way, I haven’t had any feedback yet about the outgoing links tracking feature of Counterize. I would appreciate your feedback about it 🙂

      Thank you for your interest in Counterize!

      Kind regards

      • Dominik says:

        Okay, my first feedback is that tracking outgoing clicks only works if the links don’t have an “onclick” event when Couterize code is executed. At this moment I’m also running Analytics via Yoast’s Google Analytics Plugin which is also tracking outgoing links. To do so it adds a hardcoded “onclick” into the HTML code of the page. Counterize doesn’t add another “onclick” event to these links.

        Only when I disable the outgoing link tracking in Yoast Google Analytics Counterize can successfully add its tracking function to these links.

        I’m not sure about “normal JavaScript” but with jQuery it would be easy to have more than onclick event at the same time.

        • Hi Dominik,

          Thank you for your feedback.

          As for the onclick event, I believe that Counterize should add an onclick event to all links (and not replace it with its own event), provided the onclick event hasn’t been cancelled (for example if the hardcoded onclick attribute return false I think). To be verified.

          • Dominik says:

            I used the Developer-Tools in Chrome (F12) to check the links on my page. In there I can see the event listeners assigned to page elements and my links only had one event listener: the one from Google Analytics. No other listener seems to be assigned to them. Only when I disable the Analytics click-tracking I get see event listener of Counterize.

            My interpretation of this is that either Counterize fails to add the event or it is removed later – but I don’t think that’s the case, because Yoast’s Google Analytics plugin modifies the HTML and adds an “onclick” to the links -> it does not use any JavaScript to modify the links after the page has been loaded.

  40. Szépe Viktor says:

    Thank You for this plugin!
    – when using ‘NOT LIKE’ filter the SQL should be AND-s, not OR-s
    – when displaying google keywors like “sajtföndű” or “megrendelőlap” (with accented characters) use a code like this:

    $new_str=''; for ($i = 0; $i  127) ? '&#'.$code.';' : $keyword;
    }
    $output = html_entity_decode($new_str,0,"UTF-8");

    All the best wishes!

    • Hi!

      Thank you for your tips, I will test them and include them in the next release of Counterize. If I forget to add it, be sure to remind me 🙂

      Thanks again !

      Edit: Your for loop looks uncorrect at first glance, could you try to send a correct version?

  41. Eli Nachmany says:

    How do I have a reads counter show up on the actual post page? I want the public to see how many reads that each of my posts has.

    • Currently, you should edit your theme and take advantage of the counterize_current_post_hits() function to display the hits for the current post. There are currently no shortcode to include this data in the post itself, but it is planned.

    • You can see the result in this current page in the right sidebar. Note that you have to use the conditional widget to only display it when displaying a post.

  42. Bert says:

    Can you tell me how I can get Counterize to fill in the XX’s in the following sentence: “Welcome, you are visitor XX of my website.”

    Thanks.

  43. luchosar says:

    Hey. update the latest version of WP, launched last night and now all statistics are gone. In all my sites where you installed the plugin does not work and takes forever to open. : (

  44. Charles says:

    Do you have a basic user guide for this plugin?

    Where do i add functions?

    I want my dashboard to display how many vists to each page of the site.

    Where do i add this counterize_getpagesamount() ??

  45. Charles says:

    Is there a way to stop counterize from gathering stats from a single post or page?

  46. DrillMaster says:

    What does this mean and how can I correct it?

    Fatal error: Out of memory (allocated 29360128) (tried to allocate 901447 bytes) in /homepages/43/d338629168/htdocs/wsb5978657401/wp-includes/class-phpmailer.php on line 1983

    Thank you!

  47. Arjan 't Hart says:

    I get the following error Warning: shell_exec() at the counterize dashboard. What can I do about it?

  48. Robert says:

    Hi Gabriel, few days ago I’ve upgraded the plugin by the wordpress command.
    Upgrade worked and that was fine.

    Since that day, I’ve never written new articles on the blog.

    Today I went to write a new one but I see one big behavior, in the Write Article page, it is missing the formatting toolbar, while in “Visual Mode”.

    De Activating Counterize and going back to write/edit one post, the toolbar, re appear.

    What’s up?

    Do you have any explanation or suggestion?

    Thank you
    Robert

    • Robert says:

      I also removed and reinstalled it

      When Counterize is removed, the text formatting toolbar in the View mode (inside post publishing and editing) is present.

      When Counterize has been reinstalled, the the text formatting toolbar in the View mode (inside post publishing and editing) is disappeared.

      To write posts, being able to i.e. set Bold, insert links etc etc in view mode, I must disable Counterize.
      Tried also to disable singles and all counterize sub-plugins (pages, referrers and so on) same result

      Bad behavior

      What could be the reason?

      Thank you

      P.S. I have only 9 plugins
      Akismet
      Alexa Rank Widget
      Anti-Captcha
      AutoBlogged
      Counterize
      Google Analytics for WordPress
      Google XML Sitemaps
      Hana Flv Player
      HeadSpace2

  49. Maria says:

    Hi
    I can’t see where is the option to send reports by mail… 🙁
    Thanks a lot!

Leave a Reply to Charles Cancel reply

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.