StatCounter doesn’t really have a Popular Posts plugin for WordPress. Though many WordPress blog uses SC, it doesn’t have a widget that shows the Popular Posts. I uses it and wanted to have this feature. So, I created a plugin called StatCounter Popular Posts written in short ad SPP.
It’s a plugin that adds a widget to WordPress which can be added to the WordPress Site layout (sidebar, footer, header …). It’s a simple plugin and doesn’t overheat your WP installation.
All you have to do is give plugin the project ID of your StatCounter Project and make the project Public which should be Visible for all, so that the plugin can access this like normal person and get the popular posts.
By Posts, it doesn’t mean just posts. All stuff that come in the "Popular Pages" section of your SC stats will be in the widget too.
- All Popular Pages (posts, pages etc..)
- Customization (items limit, type of counting [Pageviews, Visits])
Download the plugin from GitHub.
Extract the folder "sc-popular-posts" from the archive you downloaded into "/wp-content/plugins" directory.
Activate the plugin through the ‘Plugins’ menu in WordPress
The Settings page of SPP can be accessed from Settings -> StatCounter Popular Posts
You can see an input field asking for the ID of your StatCounter project. Paste it and save the settings. That’s the only field that you need to configure.
Here’s how you find the project ID :
- Go to your Project Summary Stats Page
- See the URL
Here’s a URL :
In the above URL "p1234567" is the Project ID.
Go to your Widgets Page (Appearance -> Widgets). You will see the new "StatCounter Popular Posts" widget there :
You can add it wherever you like. You can also set the following options on the Widget :
- Type of Counting
- Items to be displayed
The Type of counting gives the plugin to get the stats based on the pageviews or the visits.
The items that should be displayed is the second option. Any integer from 1 is acceptable to it.