How To Install the WordPress.com Stats Plug-in on Your WordPress Blog

April 28, 2010, By Desi Mikkel

If you’re like me and have a fresh install of the popular WordPress publishing platform on your own server space, you may be looking for a way to see how well your new web log is taking off. ‘WordPress.com Stats’ is a plug-in hosted on WordPress.org that you can download and use to track statistics and find out what is (and what is not) popular on your new site.

Note: To complete this tutorial you should already have the WordPress publishing platform installed on your own server space, be able to extract a package / zip file , have a WordPress.com account and be able to use an FTP client.

Adding the ‘WordPress.com Stats’ plug-in to your WordPress site

Go to wordpress.org/extend/plugins/stats/

and click the red “Download” button in the top right column, to download this plug-in.

You should see a popup asking you if you would like to save or cancel, since you want to save,  click ‘Save File’.

Once the Download is complete, go to your desktop, open your new package and extract to your desktop. You should see a folder labeled ‘stats’ appear on your desktop.

Run your FTP client and connect to the server that your wordpress blog is hosted.

Once connected, make sure you are displaying both the contents of the stats folder (located on your computer) and the plugins folder (located on your server).

To get to these points typically you will click through folders “home > desktop > stats” on your end and “web > domainurl > wp-content > plugins” on the server side”

Tip: If you are using Fire FTP a free plug-in for Firefox (pictured above), your computers directories will be located on your left, and your server hosted directories will be on your right.

On the server side (where directories located on your server are displayed), go into your plugins directory (folder)

in your plugins directory, create a new directory named, ‘stats’.

Now open your new ‘stats’ directory.

On your side (where directories located on your computer are displayed), go into the stats folder you created earlier (when you extracted from your zip file), then select “stats.php” and “open-flash-chart.swf” and upload these two files to the stats folder you just created on your server using your FTP client.

Your files are now where they need to be.

Now you will need to go get your free API key from your WordPress.com account so you can activate this plug-in.

If you don’t have a WordPress.com account, you will need to sign up for one. A basic WordPress.com account is free. After you sign up, an API key should be emailed to the email address you signed up with.

If you already have a WordPress.com account, go to it and login. After you have logged in, you will be able to find your API key listed on your personal settings page. You can get there by clicking the “Users” button on the left hand side and then clicking the “Personal Settings” sub menu link.

You should now be directed to your, “Personal Settings” page where your API key should be displayed (near the top center of the page).

It is a good idea to make note of that key now and after you are done with this tutorial, to store it in a secure place.

Note: Treat your API key as you would a password and don’t share it. You can find out more about WordPress  api-keys at http://wordpress.com/api-keys/

Now that you have your API key, go and log into your WordPress account (not the one on WordPress.com but the one hosted independently on your own server space), this should bring you strait to your Dashboard.

Now, click the ‘Plugins’ Button on your left

and you should see the “Manage Plugins Page”.

Look for your ‘WordPress.com Stats’ plugin and click the ‘activate’ link.

Since you haven’t entered an API key yet you will see a red alert message saying, “WordPress.com Stats needs attention: please enter an API key or disable the plugin”.

(Note: While doing this, I noticed an edit option under the ‘WordPress.com Stats’ plug-in on the ‘Manage Plugins’ page, so if you would rather edit the plug-in manually instead of forcing the alert, you can probably enter your API key that way too.)

Go ahead and click the “WordPress.com Stats” link located at the beginning of your alert message and you will be sent to a page where you can easily enter your API Key without any hard coding necessary.

After you enter your key and click save, you will be sent to page asking you to confirm your API key account selection and association with that account.

If you made a typo or entered a key that does not belong to the WordPress.com account that you want your blog associated with, then go ahead and click the “Re-enter API key” button and type in the correct API key now.

If the API key you entered is correct, proceed to click the “Add to WordPress.com account” button to add your WordPress blog to your WordPress.com account in order for your new ‘WordPress.com Stats’ plug-in to work.

Congradulations! you are done 🙂 You should see a page telling you, “The WordPress.com Stats Plugin is configured and working”.

Now, although your done and your blog has been registered with wordpress.com for statistical purposes, it will take some time to track your stats and until this is complete there will be nothing to display.

The wait time for me was about 17 minutes, but this may very. With that in mind, now is probably a good time to make a sandwhich, go outside or go do something other than sit in front of your computer screen, continuously hitting the reload button until your stats appear.

Until stats for your new site have been tracked, you will see this message.

After tracking is complete, you will be able to view your stats by going to ‘Dashboard’ > ‘Site Stats’. If you log-out and log back into your server hosted WordPress account you will be prompted to log into your WordPress.com account to view your stats, as the servers who calculate these stats for you with this plug-in belong to them. Enjoy 🙂

(Image Credit for feature image: ‘Sample WordPress.com Stats Graph’ goes to: Daniel Voyager at http://www.flickr.com/photos/danielvoyager/ / CC BY 2.0)

© 2008-2012 DeviceMag.com - All rights reserved | Privacy Policy