WordPress.com Stats Plugin 1.1

We updated the WordPress.com Stats plugin just a little bit today. Now, instead of redirecting you to dashboard.wordpress.com, the stats are loaded in an iframe on your own blog’s dashboard. You still have to be logged into wordpress.com to see your stats. If your plugin version is 1.0, you should upgrade to 1.1 to see the changes. Just replace the old stats.php file with the new one.

The good news is that you don’t have to leave your site, we still take care of your data just like before and we can still update the interface with new features, such as the new clickable chart points, without pushing an updated plugin.

The bad news is that the iframe will often have a vertical scroll bar or empty space at the bottom. We would resize the iframe dynamically but browsers won’t allow it because the pages are not served from the same domains. Browser security policies prevent that kind of cross-site scripting.

This change was prompted by countless requests to do away with the redirect. Thanks for that. :-)

Previous Post
Leave a comment

40 Comments

  1. Great timing! I was just looking at my plugins yesterday wondering if a new version of this was going to come out soon. Thanks for all your hard work on it.

    Reply
  2. Nice one, thanks! If there’s one thing I can grit my teeth about in the new version, it’s that I don’t like the addition of the “Random hot post” in the upper right corner.

    Reply
  3. Cheers Andy, much appreciated.

    Question though – where would I report potential bugs for a plugin like this?

    Reply
  4. Hey this is a great update and it works! Thanks…

    Reply
  5. nice info thx

    Reply
  6. I’ve modified 1.0 to use https instead of http (so does the rest of my wp-admin). Why not do that for stats plugin as well?

    Reply
  7. I was never able to get it working for my site, so I had to uninstall it…such a shame =/

    maybe I’ll give this new one a shot…

    Reply
  8. I dont bother with redirect. This should be a option for users. iFrame sucks.

    Hehhehehhe

    Reply
  9. Why not set up the stats as a web services with output in XML or JSON, and use an AJAX method to bring the data into the local admin pages?

    Reply
  10. Great idea, and I like the upgrade, but you might want to work on the Random Hot Post. The first one that came up for me was a big picture of a dildo. My boss might not like that ;)

    Reply
  11. Good change, :) thanks guys!

    Reply
  12. pavelevap

     /  July 26, 2007

    After upgrade I have in Dashboard two possibilities:
    1) In left sidebar is message Visit your Global Dashboard to see your blog stats. I am then redirected to wordpress.com and all works well.
    2) In upper menu, there is link Stats (index.php?page=stats) and then there is a login WP screen and I cannot login with my admin password (ERROR: Cookies are blocked or not supported by your browser.)
    But My cookies works well, I never logged in to wp-admin (only for the first time and then I was remembered). Everything in admin area works, only this is not possible for me…
    Thank you for your help…

    Reply
  13. Andy,

    I know you can’t manipulate the size of the iframe from within the iframe, but what about doing it from outside? Maybe you could estimate the height and modify the URL by adding an anchor (#height=700) which could then maybe read by the local site. Or, if browsers disallow that, you could just use AJAX to do a handoff (WP.com iframe decides proper height, uses AJAX to send it to WP.com. AJAX from local site to local server asks for the height, local server asks WP.com, WP.com responds, local server does AJAX response with height adjustment, local DOM takes care of it). Maybe too complicated.

    Of course serialized output/JSON would be the best, as people could write their own front ends for it.

    Reply
  14. Stuffing the reports into the page via AJAX would make two page loads per click and complicate the thing more than I wanted for this revision. We’ll see how it goes.

    In another life, stats data were loaded via an XMLRPC multicall. Maybe that will be in the next iteration.

    Reply
  15. “You still have to be logged into wordpress.com to see your stats”

    Does this mean that to take advantage of the iFrame, I have to log in to my self-hosted wordpress and my wordpress.com? If so, I might aswell just log onto WP.com

    Or am I misunderstanding something?

    Reply
  16. Alex: yes, you have to be logged into both accounts.

    Reply
  17. I think it would make a whole lot more sense and make a prettier semantic experience if the stats were passed via REST. iframes are hackish at best and the need for data IN an actual wordpress admin is also pretty important.

    Take the industry standard approach and make this data available via XML. As an alternate, make it available via JSON too. In fact, with WordPress move to jQuery, it makes even more sense to pass data via JSON.

    But then again, I’ma JSON whore lately so take the suggestion as you will. ;-)

    Reply
  18. Aaron: jQuery is not available in WP 2.1 so I’d have to bump the requirements. Also, that would still require logging into wp.com.

    I’d rather do it by XMLRPC and not require a login. Also, that would facilitate a Top Posts widget. That may be the next iteration but it isn’t planned at this point.

    Reply
  19. Many thanks Andy, it might not be the final version, but it is sure a step in the right direction, so many thanks for that.

    Being logged into both is not a problem after the initial log in, and having the stats more local is great.

    Andy, do you have any aims on including feed stats at some point?
    Cheers

    Reply
  20. ma2t: I’m glad you’re pleased. Feed stats are not planned.

    Reply
  21. Mark, Aaron, Dougal, et al: If we made the plugin use APIs like REST or JSON and static we wouldn’t be able to launch things like this without updating the plugin and forcing everyone to download it again. We update stats features as often as once or twice a month. We’d need to update the APIs and everyone who used them would have to update just as often. Finally iframes are more secure then loading HTML/scripts directly.

    Reply
  22. This new version of the stats plugin that embeds itself into the page does not work. EVERY TIME I click on the Blog Stats link, I’m asked to log into my WordPress.com account, which then redirects me to my profile. I would then have to renavigate over two clicks to see the stats, and then it displays the whole WordPress.com admin header inside there, so that half of the page is wasted for the header space. And it doesn’t remember my login either, it prompts me to go through that every time.

    Version 1.1 is a horrible upgrade. I’m going back to version 1.0–I really have no problems with having a redirect, and until you get rid of the iframe, I’m staying with 1.0.

    Reply
  23. @ webmacster87

    If it helps, I was experiencing the same problem when viewing the page in IE7.

    I got around this by adding wordpress.com to the list of “allowed sites” in IEs cookie options.

    Tools > Internet Options > Privacy > Sites

    Then add wordpress.com and set to “always allow”

    Reply
  24. davycee

     /  August 25, 2007

    Interesting plug-in, great idea. But because you have to be logged into the “mothership”, it’s not useful for me because my user/admins don’t have access to that, and I won’t be providing it to them, because they have enough to do just remembering their own password.

    So I’m dumping the plug-in.

    Thanks anyway, I know it’s free, and I’m sure it’s very useful for the “overseer” user.

    Reply
  25. i’m looking forward to trying it. It’s been a bit tiring to login to two wordpress just to see the stats. Great plugins

    Reply
  1. WordPress.com Stats at they made me do it
  2. WorPress.com Stats Plugin 1.1 | Mangas Verdes
  3. WordPress.com Stats Plugin 1.1
  4. Update: Automattic WordPress.com Stats Plugin 1.1
  5. Top Posts « WordPress.com
  6. Photo Matt » New Stats Plugin
  7. Wordpress.com Stats Plugin Upgrade : JaypeeOnline | Blogging News & Reviews
  8. links for 2007-07-27 | Crucial Thought
  9. Wordpress Stats from your Dashboard
  10. » Wp-Plugin WordPress.com Stats » WordPress Italy
  11. Stats plugin 1.1 for WordPress : Blog & WordPress
  12. BlogSecurity » WordPress stats plugin SQL Injection
  13. www dot james mckay dot net » I could have told you this would happen...
  14. SQL Injection in WordPress.com Stats plugin » Alex Concha
  15. Blog Roundup for the 26th of July 2007 :: Christopher Ross

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,664 other followers

%d bloggers like this: