The Six Key Mobile App Metrics you Need to be Tracking.

Mobile applications are web sites, and traditional web analytics are not appropriate for mobile applications. What you need is insight that will make your app more effective. You will not find this insight by tracking downloads and installs, phone platforms and versions, screen sizes, new users per day, frequency of use, or any of the traditional metrics. Many of these have been dragged over, kicking and screaming, from the world of web analytics. Yes, these numbers will give you surface measures of the effectiveness of your app. Yes, they are important to know. Yes, you can use them to make pretty charts. But they are all output measures. They measure the results of your app design, interaction model and service level. They do not tell you what to change to achieve your business goals.

To gain real insight into your app and its users, insight that you can use to make your app more effective, you need to measure inputs. There are the six key input metrics that we cover in this article. Funnel analysis tells you why users are failing to complete your desired user actions, such as in-app purchases, or ad clicks. Measuring social sharing tells you what aspects of your app are capturing the hearts and minds of your users. Correlating demographic data with user behaviour will tell you why your user base does what it does. Tracking time and location, together, gives you insights into the contexts in which your app is used. Mobile apps design naturally tends toward deeply hierarchical interfaces – how optimised is yours? Finally, the real business opportunity may be something you never even thought of, so capturing the emergent behaviours of your user base is critical. Let’s tale a closer look at each of these metrics, and then take a look at how you can get this data with today’s services.

Funnel analysis allows you to determine the parts of your application that are preventing your users from reaching your business goals. Let’s take a simple unit converter app as a example. The canonical unit converter app lets you convert between kilograms and pounds, or inches and centimeters, and so on. Let’s say one of your business goals is to get your users to sign up to a mailing list from within the app. If you look at the user journey this requires, you might have a call-to-action button on the main screen, followed by a form to capture the email, followed by an acknowledgment page telling people to check their email accounts to verify their subscription. Funnel analysis breaks this user journey down into discrete steps: the tap on the button, typing in the email address, submitting the email address, reading the acknowledgement page. You need to know the percentage of users you are losing at each stage. Probably more than 50%. Understanding this activity funnel to your desired business goal is critical to building an effective app. Perhaps the next version should drop the call-to-action button, or use better copy text. Use funnel analysis to measure this.

Social media are a key element in the promotion of your app. When you leverage these media, you need to track the viral spread of your app. This is more than simple counting the number of tweets or facebook likes. You need to understand the structure of the social network you are attempting to permeate. You need to find the highly interconnected individuals, those who recommendations are actively followed by their friends and acquaintances. In any social network there are always a small set of key individuals who know everybody. You need to identify these people and engage with them. This might be as simple as special promotions, or even making them employees! Your mobile analytics solution should be telling you who these people are.

Do you understand the demographic constitution of your users, and can you correlate these demographics with user behaviour? This is the classic diapers and beer effect. A major UK supermarket chain found, through mining their purchase data, that increased beer purchases were correlated with increased diaper purchases. Cross-referencing this with the demographic data they have collected via a loyalty card scheme, the supermarket chain was able to figure out that parents with new babies were staying at home having a homemade meal and a beer, rather then going out to restaurants. This allowed for far more effective targeted advertising. Demographic data are more difficult to capture in the mobile app space, but carriers such as Sprint are now beginning to offer this information.

Location is an important element of the mobile user experience, and many mobile analytics services will offer location analysis. However this is not enough. Again, simply counting the number of users in various geographies does not tell you very much. It validates a business goal, but does not give you insight. You actually need to track the temporal dimension as well. Time and space must be analyzed together. Take our unit converter app. Usage of the app on Sunday afternoons within DIY store differs from at-home usage at mealtime during the week. In the first case you might like to show ads for power tools, in the second ads for food products. Mobile analytics offerings have yet to reach this level of capability, so you may need to consider custom solutions for this type of analysis.

Mobile application interfaces are very hierarchical in nature. This means that there are lots of screens with small amounts of information that the user has to navigate through. There simple isn’t enough screen space to show too much information at once. As result, the careful design of the screen hierarchy is critical to effective use of the app. If a particular function, such as in-app purchases, is too deeply buried, you will not achieve your goals for the app. Therefore it is very important to measure of the navigation pathways within the app. Berkeley University in California determined the layout of their campus walkways by not laying any paths at first. After the students had trampled the lawns for a year, they then build the pathways where the students had walked. This is what you need to do. (Actually, the Berkeley story is an urban legend, but it’s still a great one)

The final metric is something that requires a certain open mindedness. It can be measured using some heavy mathematics, but it can also be noticed intuitively. When you put a product on the market, it may well be the case that your customers start using it in weird and wonderful ways, that you never imagined. Hashtags (#thesethings) on twitter are a good example. Twitter did not invent them, but noticed that their users had come up with this interesting convention for marked content themes. They embraced this emergent behavior and were handed a core product feature on a plate. Of all the metrics in this article, this one, emergent behaviour, is the most precious. It could turn you into the next facebook (relationship status? What a feature!), or you could kill the golden goose without even knowing it by ignoring your users (Iridium satellite phones anyone?). Detecting emergent behavior is both and art and a science – keep your eyes open.

First published in GoMoNews Nov 2010.

Posted in Uncategorized | Leave a comment

Debug PhoneGap Mobile Apps Five Times Faster

PhoneGap is a fantastic open source project. It lets you build native mobile apps for iPhone, Android and others using only HTML, CSS and JavaScript. It’s a real pleasure to work with. It makes developing mobile apps a lot faster.

Still, you might find that your debug cycle is still too slow. After all, you still have to deploy your app to your phone for proper testing, and this can chew up precious time. The faster you can wash, rinse and repeat, the faster you can debug, and the faster you can deliver.

One way to speed things up is to use Safari on your desktop. There’s an even faster technique, but we’ll get to that in a minute. Using a WebKit-based desktop browser like Safari means that your development cycle is almost as fast as building a static website. Edit, Save, Reload. Just point Safari at the www/index.html file in your PhoneGap project and away you go.

Well almost.

Desktop browsers don’t offer exactly the same API, nor do they work in exactly the same way. Some mobile functions, like beeping or vibrating the phone are not really testable. The biggest issue though is that desktop browsers are too fast. Don’t forget that your runtime target is a mobile version of WebKit, such as Mobile Safari. Another issue is that touch gestures are tricky to handle, and have to be simulated with click events. It is worth it though for the fast development turnaround for certain kinds of functionality.

The obvious next step is to compile up your app in XCode and deploy to the simulator. Again, this works pretty well, but even the simulator has differences from the actual device, and again, it is just too fast. So what else can you do?

Why not install your native app as a web app? Sounds weird I know. The whole point of using PhoneGap is so that your apps can be native! But, if you install your app as a web app, guess what? No more installs! You just reload the app directly on your device every time you make a change.

Setting this up requires a little configuration. You need to run a web server to serve up the files in the www folder of the PhoneGap project. nginx is a good choice – here’s a simple configuration snippet:

[gist id=”604802″]

You can then point your browser at http://your-ip/myapp/index.html and there’s your app! Do this using mobile Safari on your device, hit the + button and select “Add to Home Screen” to install as a web app, and away you go.

The big advantage to this approach is that you can test your app pretty much as it will appear and behave. You can even access the mobile safari debug log. Just remember to use the special meta tags to get rid of the browser chrome.

[gist id=”604807″]

One further advantage is that the API environment will now be slightly closer to the full PhoneGap mobile API. Of course, you won’t be able to do things that can only be done using PhoneGap, but this gets you quite far along the road.

One final trick. Do the same thing on the desktop iPhone emulator and speed up your testing there as well!

Posted in Uncategorized | 1 Comment

The Difference Between Alchemy and Chemistry

Paris. It is the 8th of May, 1794. Antoine Lavoisier, a partner in the despised Ferme général, stands before the guillotine. As a senior partner of the Ferme général, a tax collection agency for Louis XVI, Lavoisier is one of many wealthy aristocrats beheaded during the French revolution. Later, Joseph-Louis Lagrange, the esteemed Italian mathematician (and without whom today no satellite would make it into orbit), would write: “It took them only an instant to cut off his head, but France may not produce another such head in a century.”

Why would Lagrange care for a wealthy tax-collector? This tax-collector, the chemist Antoine Lavoisier, put to death the most embarrassing of the pseudo-sciences: alchemy. He did this not by great experiments (although he did some of those), nor by great denouncements (he left that to Robert Boyle’s The Sceptical Chymist), nor by great popularity (not many rushed to save him from the guillotine). Alchemy was ultimately defeated by the creation of a common language for naming chemical elements. We still use much of this language today when we talk of sulfates or oxides. Published in 1787, Lavoisier’s Méthode de nomenclature chimique describes an organised systematic method for naming chemical compounds, both those already known, and importantly, those yet to be discovered.

Why does this matter? And why does this matter more than Lavoisier’s other work (funded by all that tax collecting)? The establishment of a common language and a common standard for chemistry allowed this new science to separate itself from the the medieval confidence trick that is alchemy. The core cultural aspects of the practice of alchemy are secrecy, obfuscation, indirection, and mysticism. To read a given alchemical text, and to then attempt to reproduce the activities (calling them experiments is too kind) described, was often impossible, even for experienced alchemists. The language of alchemy is one of multiple dialects, private jokes, and over-the-top jargon. The pinnacle of alchemical exposition is the wonderful illustrated manuscript Mutus Liber. Published in France in 1677, this book consists of nothing more than a series of mystical illustrations, presented without explanation. These illustrations describe, in considerable detail, the process whereby one can obtain Gold from Mercury. I have taken some time to divine the meaning of this great work. I alone can finally reveal the mystical secrets contained within its fifteen sublime pages. It now seems clear that it is a fairly straightforward introduction to the photoneutron process (briefly: Mercury 198 + 6.8MeV gamma ray 1 neutron + Mercury 197 Gold 197 + 1 positron). Sadly, schematics for a nuclear research reactor were not included.

How powerful ultimately, was Lavoisier’s new chemical language? Powerful enough to convince Richard Kirwan, proponent of the phlogiston theory of fire (this was a magical substance released via burning), to renounce his views and accept those of Lavoisier. Of course, the science and the experiments did the grunt work. But the conversion of Kirwan has more to do with open communication and open data than lab work. Written in English, Lavoisier would not have been able to read Kirwan’s 1787 Essay on Phlogiston and the Constitution of Acids, were it not for the remarkable scientific partnership that he formed with his wife, Marie-Anne Pierette Paulze, one of the great unsung heroes of modern chemistry. Not only did Marie-Anne, proficient in Latin and English, translate Kirwan’s book, she also translated much of Lavoisier’s copious correspondence. This was possible only because she herself was a subject matter expert, working closely with Lavoisier as a co-researcher. Her documentation of their work, particularly in the form of engravings, is an important part of our shared scientific heritage.

Open communication between scientific collaborators led to open communication between scientific rivals. In 1791 Kirwan pronounced himself a convert to Lavoisier’s Oxygen theory of combustion (carefully established by weighing the reaction components before and after burning to establish that fire does not create or destroy matter, only converts it to another form). How was this possible? Lavoisier and Kirwan communicated using a common chemical language. By freeing themselves from the obtuseness of alchemy, they were able to communicate directly and openly. Kirwan could always be certain, using the Méthode de nomenclature chimique (an english translation was available as early as 1788), that he and Lavoisier were talking about the same chemicals.

The development of an open standard lead to an exponential explosion of research progress in the nascent field of chemistry. This is simply another instance of Metcalfe’s law: the value of a network (of scientists) grows exponentially with the number of interlinked nodes (scientists who can communicate with other scientists). There was no sort of mathematical alchemy in the 1700’s – mathematics already had a common set of concepts. Joseph Priestley, discoverer of Oxygen, writing nine short years after Lavoisier’s book, shows us the power of exponential growth: “There have been few, if any, revolutions in science so great, so sudden, and so general, as the prevalence of what is now usually termed the new system of chemistry…”. Open standards enable open data, and both enable rapid scientific progress.

Posted in Uncategorized | Leave a comment

Do Something Practical With CSV Files!

Want to be able to export and import tables from your database using a web interface? You've come to the right place!

I've just finished a new tutorial for our CSV Manager product: Uploading and Downloading CSV Files from a Website Database. It's one of those classic CSV use cases — a simple solution to a tricky problem.

Basically, you can outsource comnplex data editing tasks to Excel. This means you don't have to write such a complex back office application for your customers. And everybody's happy!

Posted in Java | Leave a comment

Spark Lines Without the Spark

Sparklines are one of those great ideas that you just know is “right” the moment you see it. Edward Tufte invented them, and let me tell you, he knows his stuff.

Here's an example: . Want to make some yourself? Check out Joe Gregorio's Sparkline creator.

So what's this rant about? Well given that sparklines are such a great little idea, such a compact, non-intrusive way to present information, you'd imagine it would be hard to get them wrong. And that's exactly what Der Spiegel has managed to do.

Take a look at this article about the current market meltdown. Look at all those lovely sparklines! Each one right beside the market index refered to. Lovely.

Oh wait. They're all the bloody same! Huh? Why go to the bother of inserting a little graphic beside each market index, in the text, and not making it a sparkline? Imagine how much more readable and understandable the text would be if these little graphics were real sparklines! Way to go. What a waste. If I was the online editor of Der Spiegel I would really jump on this and sort it out. What a difference it would make.

Posted in Rant | Leave a comment

Some Volatile Patterns

I've always regarded Java's volatile variables as voodoo variables. In fact, I've been scared off by very many articles telling you how terribly dangerous they are. In cases like these I tend to retreat to the safety of a few good patterns.

Except, I could never find any good patterns for using volatile. Luckily, Brian Goetz has just written an article solving this problem! Go check out Managing volatility.

The patterns are:

And hey, it's Brian Mr. Concurrency Goetz, so this stuff has to be good!

tag gen:Technorati Tags: Tags:

Posted in Java | Leave a comment

How to Beat Nasty Interview Programming Tasks

Shane Bell does a write-up of an interview he went through. Apparently the company just dumped a programming exercise on him and left him with a pencil and paper for an hour. Nasty!

While the basic idea of a “real” programming test at interview is great, asking someone to do it with a pencil is just plain daft! This is a perfect example of cargo-culting. They know they should get people to program in an interview, they know they should ask a “tough” question. But then they invalidate the whole thing by testing “pencil-based-programming-acuity”! Whatcha building guys? A Babbage engine? Um, you know, how difficult is it, if you are going to the trouble of all this testing, to set up a locked down machine with no internet access?

Anyway, Shane runs through the exercise and his solution. He does pretty well. He also asks if there's a better solution.

Yes, Virginia, there is a Santa Claus!

And he lives at MIT OpenCourseWare. Specifically, the AI search lectures. Fantastic stuff.

Looking at the problem they gave Shane, finding a path through maze from top-right to bottom-left, it looks like you could throw an A* search at it and do pretty well. Add some iterative-deepening if you're feeling fancy and want to handle big mazes. Basically, you try to predict the best direction by calculating your current straight-line distance from the goal square at the bottom right, and choosing the next square as the one that gets you closest. If you get stuck in a cul-de-sac, backtrack out of it (Shane does use backtracking).

So how do you beat these nasty interviews? Know your search algorithms! Most of these “puzzles” can be solved with some sort of search. I'll bet you anything the guys who set this question where either a.) clueless, so a good algorithm will really impress them, or b.) not clueless and actually looking for a proper algorithm like A*. Either way you win!

Posted in General | Leave a comment

Level 3!

Well you might have thought that I had given up on the touch typing. I've been trying to learn to touch-type for the last two years. It's all going tragically slowly. But, I can tell you that I am in fact touch-typing this very blog post — my first touch-typed blog post ever!

I'm not really there yet — my touch-typing is still slower than my “natural” typing. But I have, finally, cracked the notorious level three on the site. If you've read my previous post about learn2type, you'll remember that level three is this dreadfully unbalanced drill that goes straight into all the punctuation straight from the home row keys. It's a real killer for your enthusiasm. You have to be pretty dedicated to beat it. It took me over a year. While the learn2type site is pretty OK so far as learning to type goes, it does have some serious flaws. And I have not seen any updates in over a year. Still, I would recommend it overall &mdash the performance graphs in particular are very cool, providing good feedback on your progress.

My meta-strategy for learning to touch-type remains the same as before — try all the online tutoring sites one at a time until I have good speed and accuracy. Stay tuned…

Posted in General | Leave a comment

Boxes and Lines, Boxes and Lines…

Charles Miller posted a great comment on his blog that absolutely cracks me up:

Pretty much any computing problem, given a sufficient level of abstraction, can be reduced to a diagram of boxes joined together with lines. At this level your solution will look startlingly simple, and you'll be able to sell it to someone.

So true, so true.

Posted in General | Leave a comment

How to Create a Comment Archive Using CSV to Generate HTML

I've been trying to find a workable way to manage my comments for quite some time. By which I mean, the comments that I make on other people's blogs. You need to be able to go back and see if the conversation has progressed. It's also nice just to have a record of what you said and when you said it.

I was using CoComment for a while. This is a service that tracks comments on blogs. It's pretty cool. Trouble is, it only works for the main blogging engines, and you have to install a plugin. I removed all plugins from my Firefox recently because it was acting up, and I'm not keen on reinstalling just at the moment. In any case, the CoComment plugin tended to slow down non-blog sites (looking for comment forms I suppose).

So I've decided on a simpler solution: just have a page on my blog where all my comments are listed in reverse chronological order, with a link back to the relevant blog entry. I can skim through the first few to see if recent conversations have anything new. As for the old conversations, well, I guess I won't know if there are more comments. But that's “good enough” for the time being. The easiest way to build this page is cut-and-paste. Come up with a bit of HTML and copy it for each new entry. Yeah, it has to be done by hand, but hey! The archive of comments is interesting enough to be worth recording.

Here's the comments archive, so you can see what I mean.

Well, you're right, cut-and-paste is such a bad smell. It's better to have your data in a manageable format. So Ricebridge to the rescue! You can put the data into a CSV file and generate the HTML (or rather XHTML) from it. For example, here's a record of some comments:

  "Hey! I did all that already! Where's my six figures? love it :) "
2007-04-04,Tyner Blain,, 
  "It’s amazing how naming something almost completely defines it."

It's just a CSV file. Easy to update by hand. Whenever you make a new comment, throw in the details (date, blog title, link and comment text) at the top of the CSV file.

So then how do we turn this into HTML? Well, here's the HTML I'm producing from this CSV file:

<div class="commentbox">
  <div class="comment">
      <a href=""></a>
    <p>Hey! I did all that already! Where's my six figures? it :) </p>
  <div class="comment">
      <a href="">Tyner Blain</a>
    <p>It's amazing how naming something almost completely defines it.</p>

It's a nice little microformat of sorts, I suppose.

To produce this, you need to take the CSV columns and place them into the right positions in the XML format. We're generating XHTML, which is just XML, which is just well-behaved HTML, so this is all cool and froody.

Using XML Manager, you can define a set of XPath expressions to handle this. And here they are:

each row     -> /div/div
'commentbox' -> /div/@class
'comment'    -> @class
Date         -> b/span
Blog         -> b/a
Link         -> b/a/@href
Comment      -> p

This creates a main <div class="commentbox"> containing a set of <div class="comment"> elements, one for each comment. The CSV columns all go into subelements of the comment div.

And here's the code to tie it all together:

CsvManager csvman = new CsvManager();
List in = csvman.load("data/comment.csv");

RecordSpec rs = new RecordSpec("/html/body/div/div", 
    new String[] { "/html/body/div/@class", "@class", 

List out = new ArrayList();
for( Iterator cI = in.iterator(); cI.hasNext(); ) {
  String[] inrow = (String[]);
  String[] outrow = new String[] {"commentbox","comment",

XmlManager xmlman = new XmlManager(rs);"data/comment.htm",out);

You just load up the CSV, and spit it out again as XML… “there's nothing to it, really…”

And then all you do is dynamically include this file on your web page, and you're done!

tag gen:Technorati Tags: Tags:

Posted in Java | Leave a comment