LeaseWeb Labs celebrates 670k unique visitors in 2014

Now that 2014 is over, it is a good time to look back with some facts on our blog’s traffic.

The 5 most popular post of 2014

#1 – 10 tools for PHP developers in Ubuntu 14.04
This post explains what a developer needs to install in Ubuntu 14.04. It is found by people searching for a PHP IDE in Ubuntu Linux.

#2 – Text mode 2048 game in C, algorithm explained
People searching for the 2048 game algorithm seem find this post a lot and the source code on Github has received over 100 stars.

#3 – PyCon 2014, full conference on YouTube
PyCon was great and so was the traffic on our website when we listed all the talks. Thank you PyCon for publishing them!

#4 – Blocking Google and Facebook tracking using Ad Block Plus and Ghostery
The popular opinion that Google and Facebook know way too much about us may be the reason for this posts popularity.

#5 – Testing framework using Maven, TestNG and Webdriver
This is a very good and technical post by Grygorii Gerashchenko on automated testing based on Java technology.

Unique visitors in 2014

Also we are very proud of the amount of unique visitors we have seen on the blog this year (compared to last year):

traffic_2013_2014

As you can see the year 2014 was a very good year for LeaseWeb Labs. Some facts:

  • We have welcomed 670k unique visitors in 2014 as counted by Count Per Day!
  • We have maintained the high post rate of 2013 with more than 6 posts per month.
  • Even without viral hits on social bookmarking sites we now reach 60k unique visitors per month!
  • We went from 1500 unique visitors per day in 2013 to 2000 unique visitors per day in 2014.
  • This year we received almost half our visitors from Google (Search) were it was one third in 2013.

Post frequency

It takes quite some effort and writing discipline to build a popular blog. These are the statistics on our post behavior:

post_counts

Let’s hope 2015 will be again a great year with lots of interesting posts. Please keep reading at LeaseWeb Labs!

 

Share

Popular posts for “Count per Day” WordPress plugin

popularpostsLeaseWeb Labs runs on WordPress and we are using the “Count per Day” plugin to keep track of our visitors. One big advantage of Count per Day is that it does not use cookies, but counts the amount of unique IP addresses per day. These are reported as “visitors”, while the amount of page views are reported as “reads”. In our experience this is a very simple and reliable way of measuring the visitors on our site. Especially when you enable the option “Cache: Count visits with ajax” in the Settings, because that will prevent bots from showing up in the statistics.

Some posts are better and thus more popular than other posts. When people visit your site for a certain post, they may also be interested in other popular posts. This is why we wanted the most popular posts listed in the sidebar (as you can see on the left). Since the popularity of posts is changing all the time and we did not feel like maintaining a static list of posts in menu. Count per Day has a the shortcode “CPD_MOST_VISITED_POSTS” to generate this list for you. Unfortunately this code generates the list including numbers and a heading. This is not exactly the way we like it and thus we created a WordPress widget for our (and your) convenience.

The widget can be simply dragged into a widget area and allows you to:

  • Set the title for the list
  • Set the amount of days to take into account
  • Set the maximum number of items in the list
  • Show/hide the counts for the selected period
  • Show/hide the header that explains the counts

We contacted Tom Braider (the author of this fantastic plugin) and we hope he will include the widget in a next version. Until then you can install the widget by adding the following code to “widgets.php” using the theme editor:

if (isset($count_per_day)) {

// Creating the widget
class PopularPostsWidget extends WP_Widget {

  function __construct() {
    parent::__construct(
      // Base ID of your widget
      'cpd_popular_posts_widget',
      // Widget name will appear in UI
      'Popular Posts',
      // Widget description
      array( 'description' => 'Count-Per-Day Popular Posts'));
  }

  // Creating widget front-end
  // This is where the action happens
  public function widget( $args, $instance ) {
    $title = apply_filters( 'widget_title', $instance['title'] );
    $days  = $instance['days' ]+0;
    $limit = $instance['limit']+0;
    $head  = $instance['head' ]?true:false;
    $count = $instance['count']?true:false;
    // before and after widget arguments are defined by themes
    echo $args['before_widget'];
    if ( ! empty( $title ) ) {
      echo $args['before_title'] . $title . $args['after_title'];
    }
    // This is where you run the code and display the output
    global $count_per_day;
    $html = $count_per_day->getMostVisitedPosts($days, $limit, 1, 1, 1);
    if (!$head ) $html = preg_replace('/<small>[^<]*<\/small>/','',$html);
    if (!$count) $html = preg_replace('/<b>[^<]*<\/b>/','',$html);
    echo $html;
    echo $args['after_widget'];
  }

  // Widget Backend
  public function form( $instance ) {
    $title = isset($instance['title'])?$instance['title']:'Popular Posts';
    $days  = isset($instance['days' ])?$instance['days' ]:'7';
    $limit = isset($instance['limit'])?$instance['limit']:'10';
    $head  = isset($instance['head' ])?$instance['head' ]:false;
    $count = isset($instance['count'])?$instance['count']:false;
    // Widget admin form
    ?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id( 'days' ); ?>"><?php _e( 'Days:' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'days' ); ?>" name="<?php echo $this->get_field_name( 'days' ); ?>" type="text" value="<?php echo esc_attr( $days ); ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Limit:' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo esc_attr( $limit ); ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id( 'head' ); ?>"><?php _e( 'Show header:' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'head' ); ?>" name="<?php echo $this->get_field_name( 'head' ); ?>" type="checkbox" <?php echo $head?'checked="checked"':'' ?> />
</p>
<p>
<label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Show counters:' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" type="checkbox" <?php echo $count?'checked="checked"':'' ?> />
</p>
    <?php
  }

  // Updating widget replacing old instances with new
  public function update( $new_instance, $old_instance ) {
    $instance = array();
    $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
    $instance['days' ] = ( ! empty( $new_instance['days' ] ) ) ? strip_tags( $new_instance['days' ] ) : '';
    $instance['limit'] = ( ! empty( $new_instance['limit'] ) ) ? strip_tags( $new_instance['limit'] ) : '';
    $instance['head' ] = ( ! empty( $new_instance['head' ] ) ) ? strip_tags( $new_instance['head' ] ) : '';
    $instance['count'] = ( ! empty( $new_instance['count'] ) ) ? strip_tags( $new_instance['count'] ) : '';
    return $instance;
  }
} // Class PopularPostsWidget ends here

// Register and load the widget
add_action( 'widgets_init', function (){ register_widget('PopularPostsWidget'); });

}
Share