{"id":633,"date":"2009-08-18T15:43:19","date_gmt":"2009-08-18T23:43:19","guid":{"rendered":"http:\/\/blog.mozilla.org\/webdev\/?p=633"},"modified":"2009-10-02T15:42:52","modified_gmt":"2009-10-02T23:42:52","slug":"download-stats-move-to-mozilla-com","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/","title":{"rendered":"Download Stats move to mozilla.com"},"content":{"rendered":"<p>During the Firefox 3.5 launch, <a href=\"http:\/\/daniele.livejournal.com\/\">Daniel Einspanjer<\/a> and <a href=\"http:\/\/davedash.com\/\">Dave Dash<\/a> put together a neat little stats counter at <a href=\"http:\/\/downloadstats.mozilla.com\/\">downloadstats.mozilla.com<\/a>.  We decided to do a <a href=\"https:\/\/wiki.mozilla.org\/Website\/Sprints\/DownloadStats\">sprint<\/a> to try integrating this with mozilla.com to give it a proper home.<\/p>\n<p>Historically, we&#8217;ve had different ways to track new releases and their downloads:<\/p>\n<ul>\n<li>2004-2007 (Firefox 1.0, 1.5, 2.0) &#8211; Bouncer database statistics tracked redirects on the download redirector in a MySQL database.<\/li>\n<li>2008 (Firefox 3.0) &#8211; Jeremy Orem&#8217;s download stats page pulled stats from Daniel Einspanjer&#8217;s metrics feed.<\/li>\n<li>2009 (Firefox 3.5) &#8211; Daniel and Dave created the 3.5 download stats page, which closely resembles what we have now.<\/li>\n<\/ul>\n<p>Blast from the past &#8211; Jeremy Orem&#8217;s Firefox 3.0 stats page:<\/p>\n<p> <img decoding=\"async\" src=\"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg\" alt=\"oremj's old download stats\"\/><\/p>\n<p>As a part of our renewed efforts to <a href=\"http:\/\/www.intothefuzz.com\/2009\/08\/17\/onward-and-upward-for-mozilla-com\/\">innovate more rapidly on mozilla.com<\/a>, our first sprint brings download information to mozilla.com.  From release to release we hope this page changes in exciting new ways.  In the meantime, it&#8217;ll have a nicer place to live.<\/p>\n<p>The idea was pretty simple:<\/p>\n<ul>\n<li><em>Creating real-time JSON feeds<\/em> was Daniel&#8217;s work with <a href=\"http:\/\/www.sqlstream.com\/\">SQLStream<\/a> to manage and constantly query incoming download activity.  It was no small task, but the feed seems to work fairly well.<\/li>\n<li><em>Using JavaScript to integrate feeds into existing pages<\/em> was Dave Dash&#8217;s work.  He had to do it in both <a href=\"http:\/\/developer.yahoo.com\/yui\/\">YUI<\/a> and <a href=\"http:\/\/jquery.com\/\">jQuery<\/a> since mozilla.com uses YUI but the stats code uses jQuery.  Yes, fun, we know.<\/li>\n<li><em>Creating widgets and a landing page<\/em> was possible because of <a href=\"http:\/\/www.silverorange.com\/\">Silver Orange<\/a>.  Steven Garrity and Stephen DesRoches styled the stats landing page and worked with <a href=\"http:\/\/www.intothefuzz.com\/\">John Slater<\/a> from Mozilla to figure out points of entry on other mozilla.com pages.<\/li>\n<\/ul>\n<p>The end result is a nicely sized update to mozilla.com that we were able to finish in two weeks.  Publishing our totals gives new users a feel of activity and freshness, and funnels them to a statistics page that we can always expand later.<\/p>\n<p>We&#8217;re also excited that this page uses some neat tools we&#8217;ve grown to love:<\/p>\n<ul>\n<li>The world map is done in <a href=\"https:\/\/developer.mozilla.org\/En\/SVG\">SVG<\/a>\/<a href=\"https:\/\/developer.mozilla.org\/en\/HTML\/Canvas\">Canvas<\/a> thanks to <a href=\"http:\/\/hyper-metrix.com\/#Blog\">Alistair MacDonald<\/a><\/li>\n<li>The dynamic table uses <a href=\"http:\/\/jquery.com\/\">jQuery<\/a> and some jQuery plugins (<a href=\"http:\/\/tablesorter.com\/\">tablesorter<\/a>, <a href=\"http:\/\/omnipotent.net\/jquery.sparkline\/\">sparklines<\/a>).  It updates every minute.<\/li>\n<li>All feed data is available in <a href=\"https:\/\/developer.mozilla.org\/En\/JSON\">JSON<\/a> format which makes it easy for pages to update themselves via JavaScript<\/li>\n<\/ul>\n<p>Here&#8217;s a widget on <a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/\">Firefox product pages<\/a>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/people.mozilla.org\/~morgamic\/stats\/stats-menu.png\" alt=\"screenshot of stats total on a Firefox page\"\/><\/p>\n<p>Here&#8217;s a widget on the <a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/personal.html\">personalize Firefox page<\/a>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/people.mozilla.org\/~morgamic\/stats\/stats-feature.png\" alt=\"screenshot of stats total on the personalize Firefox page\"\/><\/p>\n<p>Here&#8217;s the main sections from the <a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/stats\/\">main stats page<\/a>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/people.mozilla.org\/~morgamic\/stats\/stats-map.png\" alt=\"screenshot of stats total on the personalize Firefox page\"\/><br \/>\n<img decoding=\"async\" src=\"http:\/\/people.mozilla.org\/~morgamic\/stats\/stats-sparklines.png\" alt=\"screenshot of stats total on the personalize Firefox page\"\/><\/p>\n<p>We hope you like the small changes we made, and if you have ideas on how to make this better, please let us know!  If you&#8217;d like to play with these feeds, you can find them here:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/stats\/getJSON.php?q=data\/country_report.json\">Country report JSON<\/a><\/li>\n<li><a href=\"http:\/\/www.mozilla.com\/en-US\/firefox\/stats\/total.php\">Total downloads JSON<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>During the Firefox 3.5 launch, Daniel Einspanjer and Dave Dash put together a neat little stats counter at downloadstats.mozilla.com. We decided to do a sprint to try integrating this with mozilla.com to give it a proper home. Historically, we&#8217;ve had &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/\">Continue reading<\/a><\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[288],"tags":[402,672,744],"coauthors":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Download Stats move to mozilla.com - Mozilla Web Development<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Morgan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/\",\"url\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/\",\"name\":\"Download Stats move to mozilla.com - Mozilla Web Development\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg\",\"datePublished\":\"2009-08-18T23:43:19+00:00\",\"dateModified\":\"2009-10-02T23:42:52+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#primaryimage\",\"url\":\"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg\",\"contentUrl\":\"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/webdev\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Download Stats move to mozilla.com\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/webdev\/\",\"name\":\"Mozilla Web Development\",\"description\":\"For make benefit of glorious tubes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/webdev\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f\",\"name\":\"Mike Morgan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/image\/1d6151e93e27d281a7fc06534ee8eae0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g\",\"caption\":\"Mike Morgan\"},\"description\":\"Mike Morgan is the former Director of Web Development for the Mozilla Corporation.\",\"url\":\"https:\/\/blog.mozilla.org\/webdev\/author\/morgamicmozillacom\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Download Stats move to mozilla.com - Mozilla Web Development","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/","twitter_misc":{"Written by":"Mike Morgan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/","url":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/","name":"Download Stats move to mozilla.com - Mozilla Web Development","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/webdev\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#primaryimage"},"image":{"@id":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg","datePublished":"2009-08-18T23:43:19+00:00","dateModified":"2009-10-02T23:42:52+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#primaryimage","url":"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg","contentUrl":"http:\/\/blog.mozilla.org\/webdev\/files\/2009\/08\/old-downloadstats.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/webdev\/2009\/08\/18\/download-stats-move-to-mozilla-com\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/webdev\/"},{"@type":"ListItem","position":2,"name":"Download Stats move to mozilla.com"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/webdev\/#website","url":"https:\/\/blog.mozilla.org\/webdev\/","name":"Mozilla Web Development","description":"For make benefit of glorious tubes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/webdev\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/373fd84922ef95d8d5171d1a72770d4f","name":"Mike Morgan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/webdev\/#\/schema\/person\/image\/1d6151e93e27d281a7fc06534ee8eae0","url":"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff5890a3252cd74f006ee33360e71c76?s=96&d=mm&r=g","caption":"Mike Morgan"},"description":"Mike Morgan is the former Director of Web Development for the Mozilla Corporation.","url":"https:\/\/blog.mozilla.org\/webdev\/author\/morgamicmozillacom\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/posts\/633"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/tags?post=633"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/webdev\/wp-json\/wp\/v2\/coauthors?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}